[英]Adding subView to iPad's UIView works incorrectly in Xcode 4.5
我的.xib包含一个UITabBar
和3个视图:
我做了一个出口:
@property (nonatomic, retain) IBOutlet UIView* _controllersContainerView;
在我的viewDidLoad
方法中,我想向_controllersContainerView
添加一个子视图:
[self controllersNavigationController].view.frame = _controllersContainerView.bounds;
// [self controllersNavigationController].view.frame = CGRectMake(0, 0, 350, 199);
[_controllersContainerView addSubview:[self controllersNavigationController].view];
但是即使我尝试将框架高度设置为额外的短值(199),它看起来也比_controllersContainerView
长,并且覆盖了tabBar
。
代码有什么问题? 在带有armv6 v7的Xcode 4.4中,它工作正常,但在Xcode 4.5中,它失败了。
将clipToBounds属性设置为YES,可能会解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.