有两种类型满足UIAppearanceContainer http://developer.apple.com/library/ios/#recipes/UIAppearanceContainer_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIAppearanceContainer
的UIView 的UIViewController
说我们这样做:
[UIButton appearanceWhenContainedIn:@[[UYLRotatingViewController class]]];
iOS如何知道UIButton是否在UYLRotatingViewController中?
这是否意味着它在UYLRotatingViewController的视图中?
答案 0 :(得分:0)
当给定UIButton
给出超级视图([myView addSubview:button]
)时,UIKit很可能会调用[[button superview] class]
,并将此类与它可能具有的任何条件外观自定义进行比较。换句话说,如果UIKit发现[[button superview] class]
等于[UYLRotatingViewController class]
,它会应用您传递给此代理对象的外观自定义。