iOS Views and Animations: Learning by Stealing · Activation Animation | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/267496-ios-views-and-animations-learning-by-stealing/lessons/7

Hey. I noticed that in animateTo function in both case .on and case .off you used break keyword. As far as I know it’s not necessary, because you won’t actually go to another switch case unless you use fallthrough keyword. It’s a minor thing and a habit carried from Obj-C probably, but I think that it’s worth pointing out.

Thanks for creating this great series!

1 Like

Hi @infull

Nicely spotted! As far as I can remember, there was no reason for putting break in there—I guess a habit out of other languages where fall through is implicit.

Glad you enjoyed it.

sam