What does it mean that a view is contained in a container when the container is a UIViewController?

There are 2 types of classes that satisfy the requirements of the UIAppearanceContainer http://developer.apple.com/library/ios/#recipes/UIAppearanceContainer_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIAppearanceContainer

UIView UIViewController

Let's say we do:

[UIButton appearanceWhenContainedIn:@[[UYLRotatingViewController class]]]; 

How does iOS know if a UIButton is in a UYLRotatingViewController?

Does this mean that it is in the UYLRotatingViewController view?

+4
source share
1 answer

When a supervisor is assigned to this UIButton ( [myView addSubview:button] ), UIKit most likely calls the [[button superview] class] , and compares this class with any custom appearance settings that it may have. In other words, if UIKit detects that the [[button superview] class] is equal to the [UYLRotatingViewController class] , it applies the appearance settings that you passed to this proxy object.

0
source

All Articles