SubView的背景丢失了
我的应用程序的结构如下:
UITabViewController:
第一个UIViewController:
UIPageViewController:
- Page1: UIViewController:
- UIView: contains Some UILabels, 1 UIButton
- Page2: UIViewController:
- UIView: contains Some UILabels, 1 UIButton
第二个UIViewController:
我在UIViewController中以编程方式添加的UIView:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
SessionView* b = [[[NSBundle mainBundle] loadNibNamed:@"SessionView" owner:self options:nil] lastObject];
CGRect frame = b.frame;
b.frame = CGRectMake(0, 88, frame.size.width, frame.size.height);
[self.view addSubview:b];
}
奇怪的是UIView没有它的背景颜色。 并且该按钮不能被点击。

我在这里上传源代码,以防万一你想检查。
我正在iOS8,XCode6,iPad上工作
非常感谢。
尝试这个 :
[mainview bringSubviewToFront:subview];

勾选子视图剪辑...............
链接地址: http://www.djcxy.com/p/87761.html上一篇: The SubView's background is lost
下一篇: How to move up a modal UIView inside of a UIViewcontroller (StoryBoard)
