[英]How can I set title of NavifationItem from IB (separate xib of my own ViewController)
Can anybody help me in such situation: I have Navigation interface in my application and push TestController to nav stack 任何人都可以在这种情况下为我提供帮助:我的应用程序中具有导航界面,并将TestController推送到导航堆栈
Also I have separate xib file: Test.xib where File owner's is TestController. 我也有单独的xib文件:Test.xib,其中文件所有者是TestController。 Test.xib has View (property TopBar set as NavigationBar and it shows) with only TextView.
Test.xib具有仅TextView的View(将属性TopBar设置为NavigationBar并显示)。
All works fine: Controller is pushed to stack, Back button is shown but there is no Title of TestController and I can't drop NavigationItem on the View to display own title. 一切正常:将控制器推入堆栈,显示“后退”按钮,但没有TestController的标题,并且我无法将ViewItem上的NavigationItem放下以显示自己的标题。
How can I set in Test.xib Title on the NavigationBar ??? 如何在NavigationBar上的Test.xib标题中设置?
PS: Programmatically works (in TestController.m -> ViewDidLoad: self.title=@"Test controller";) but I need exactly in xib from IB (it's requirement of my employer) PS:以编程方式工作(在TestController.m-> ViewDidLoad:self.title = @“测试控制器”;中),但我确实需要从IB使用xib(这是我雇主的要求)
Regards, Alex 问候,亚历克斯
添加一个UINavigationItem
并在那里设置属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.