【发布时间】:2015-08-18 08:37:02
【问题描述】:
我正在尝试自定义导航控制器,但它不起作用
我认为这是因为我正在使用应用程序委托通过此代码从一个视图移动到另一个视图:
let mainStoryboardIpad : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewControlleripad : UIViewController = mainStoryboardIpad.instantiateViewControllerWithIdentifier("HomeView") as! ViewControllerHome
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window?.rootViewController = initialViewControlleripad
self.window?.makeKeyAndVisible()
我的故事板
我正在使用情节提要更改标题或以编程方式它不起作用,我没有看到标题更改
self.navigationController?.title="Mytitle"
【问题讨论】:
-
在viewcontroller的viewdidload中使用
self.title="title" -
可行,但在这种情况下如何更改标题的颜色
-
我正在尝试这个 self.navigationController?.navigationItem.titleView?.tintColor = UIColor.whiteColor() 但它不起作用
-
感谢您的帮助,但它不起作用
标签: ios swift uinavigationcontroller