【发布时间】:2013-04-18 11:25:43
【问题描述】:
我想展示一个带有标准顶栏的UIView - UIView 标题的黑色导航栏。
- 我创建了一个 xib。
- 将顶部栏设置为 xib 中的黑色导航栏
-
将其添加到屏幕上:
_popup = [[[NSBundle mainBundle] loadNibNamed:@"Popup" owner:self options:nil] objectAtIndex:0]; CGSize screenSize = [[UIScreen mainScreen] bounds].size; _popupBackground = [[UIView alloc]initWithFrame: CGRectMake(0,0,screenSize.width,screenSize.height)]; _paymentPopupBackground.backgroundColor = [UIColor clearColor]; [_paymentPopupBackground addSubview:_popup]; [[UIApplication sharedApplication].keyWindow addSubview:_paymentPopupBackground]; UIView出现但没有黑色导航栏。这怎么能解决?
【问题讨论】:
-
2.Set the top bar to be Black Navigation Bar,实际上你没有。如果你仔细看,上面写着Simulated Metrics。
标签: ios objective-c uiview