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

This is a companion discussion topic for the original entry at

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.