Mastering Auto Layout - Part 16: Adaptive | Ray Wenderlich Videos

Learn about the types and protocols that form the basis for adaptive layout in iOS, for greater control in code.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4260-mastering-auto-layout/lessons/16

I am wondering why we choose enum for NavigationBarAppearance? Why don’t you use class in this scenario? Does it have any benefit?

Yes. A caseless enumeration can’t be instantiated, so it’s a clearer option for namespacing.