[英]How to use custom NavigationBar in ios TabBarController
[英]Custom NavigationBar height with TabBarController
為此,您需要在自定義NavigationBar高度的視圖控制器中添加:
var navBar: UINavigationBar = UINavigationBar()
func setNavBarToTheView() {
self.navBar.frame = CGRectMake(0, 0, 320, 50) // Here you can set you Width and Height for your navBar
self.navBar.backgroundColor = (UIColor.blackColor())
self.view.addSubview(navBar)
}
參考我的回答: 更改導航欄iOS Swift的高度
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.