Objective c 当容器是UIViewController时,视图包含在容器中是什么意思?

Objective c 当容器是UIViewController时,视图包含在容器中是什么意思?,objective-c,xcode4.5,Objective C,Xcode4.5,有两种类型的类满足UIAppearanceContainer UIView UIViewController 假设我们这样做: [UIButton appearanceWhenContainedIn:@[[UYLRotatingViewController class]]]; iOS如何知道UYLRotatingViewController中是否有UIButton 这是否意味着它在UYLRotatingViewController的视图中?当给定的UIButton被赋予超级视图([myView

有两种类型的类满足UIAppearanceContainer

UIView UIViewController

假设我们这样做:

[UIButton appearanceWhenContainedIn:@[[UYLRotatingViewController class]]];
iOS如何知道UYLRotatingViewController中是否有UIButton


这是否意味着它在UYLRotatingViewController的视图中?

当给定的
UIButton
被赋予超级视图(
[myView addSubview:button]
)时,UIKit很可能调用
[[button superview]类]
,并将该类与它可能具有的任何条件外观自定义进行比较。换句话说,如果UIKit发现
[[button superview]类]
等于
[UYLRotatingViewController类]
,它将应用您传递给此代理对象的外观自定义。

您是指UYLRotatingViewController.view的子视图吗?