- What is
UITransitionView? - What is
UILayoutContainerView? - Will I get in trouble for adding subviews to them?
UITransitionView?UILayoutContainerView? They are the superviews of a UITableView which is inside of a UINavigationController which is inside of a UITabBarController.
UITransitionView I got by asking for the superview of the table view. UILayoutContainerView I got by asking for the superview of UITransitionView.
They are both internal views used by Apple and not published in the SDK.
It's difficult to say exactly what Apple will or won't do however, adding a view to an undocumented view you retrieve from a superView message is not contentious. What you should not do (or be careful if you do do) is make assumptions about the view you are adding to. Specifically its class but even basic things like the fact that it even exists.
What are you trying to do? There may be a simpler way - like adding your view directly to the app's UIWindow.
本文探讨了UIKit框架中未公开的UITransitionView和UILayoutContainerView视图的作用,并讨论了向这些内部视图添加子视图可能产生的问题。建议避免对这些视图做出假设并提供了直接向UIWindow添加视图作为替代方案。
12万+

被折叠的 条评论
为什么被折叠?



