繁体   English   中英

在Xcode 4.5中将subView添加到iPad的UIView中无法正常工作

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM