![](/img/trans.png)
[英]I can not drag the UISegment to my Controller's NavigationBar in Storyboard
[英]Can I set a navigationBar transparent in Storyboard?
我在UITabBarController中有幾個UIViewControllers。
在每個UIViewController的viewDidLoad方法中,我包括以下行:
self.navigationController.navigationBar.translucent = NO;
情節提要中是否有可以做到的設置?
是的,您可以更改導航控制器的導航欄,只需在文檔大綱中將其選中即可 ,檢查此iOS7導航欄是否為半透明=否
我無法在情節提要(Xcode 8,iOS 10)上執行此操作,而是使用了自定義的NavigationBar並覆蓋awakeFromNib:
-(void)awakeFromNib
{
[self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
self.shadowImage = [UIImage new];
self.translucent = YES;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.