gpt4 book ai didi

objective-c - 当容器是 UIViewController 时, View 包含在容器中是什么意思?

转载 作者:搜寻专家 更新时间:2023-10-30 19:49:29 25 4
gpt4 key购买 nike

有两种类型的类满足 UIAppearanceContainer http://developer.apple.com/library/ios/#recipes/UIAppearanceContainer_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIAppearanceContainer

界面 View 界面 View Controller

假设我们这样做:

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

iOS 如何知道一个 UIButton 是否在 UYLRotatingViewController 中?

是不是说在UYLRotatingViewController的view里面呢?

最佳答案

当给定的 UIButton 被赋予一个 super View ([myView addSubview:button])时,UIKit 最有可能调用 [[button superview] class],并将此类与它可能具有的任何条件外观定制进行比较。换句话说,如果 UIKit 发现 [[button superview] class] 等于 [UYLRotatingViewController class],它将应用您传递给此代理对象的外观定制.

关于objective-c - 当容器是 UIViewController 时, View 包含在容器中是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13716336/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com