[英]When the UITabbar is Translucent and the UIViewController is not extended behind the tabbar, the uitabbar seems like covering a black view
第一個視圖中的標簽欄就是我想要的。 因為第二個視圖不是滾動視圖,所以我無法使用self.edgesForExtendedLayout = UIRectEdge.Bottom
將其擴展到底self.edgesForExtendedLayout = UIRectEdge.Bottom
。
這看起來令人無法接受。
而且我不想將uluabbar的Translucent
設置為false
,這不是花哨的。
我試着用另一種方式: [[UITabBar appearance] setBarTintColor: [UIColor whiteColor]];
它不起作用。 為了使它看起來更清晰,我將顏色更改為紅色。 最后一個標簽欄看起來也像是覆蓋了一些黑色視圖。
我會說在viewController的viewDidLoad
中添加此代碼將解決您的問題:
edgesForExtendedLayout = .all
extendedLayoutIncludesOpaqueBars = true
另外,您可以將tabBar
半透明狀態而不設置任何背景顏色。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.