UINavigationController 自定义 titleView
我有一个带有根视图控制器的导航控制器,我有自定义的 titleView 而不是导航项的普通标题。
如果我在其中推入一个新的控制器,默认的后退按钮标题是“后退”,因为我使用了自定义的 titleView。
我希望它有所不同。我尝试在根视图控制器的 backbaritem 中设置标题,但没有用。
我可以在我的推送控制器中创建一个栏按钮项目,并且可以将其设置为左栏项目,但我希望它像普通的后退按钮一样。 [指向向后]
- 如果我有自定义 titleView,是否可以为后退按钮设置标题?
- 是否可以创建一个像默认后退按钮一样的栏按钮项目。[指向后退,而不是普通、边框...等]?
问候, 巴拉吉·R。
I have a navigation controller with a root view controller for which i have the customised titleView instead of normal title for the navigation item.
If i pushed a new controller in it , the default back button title is "back", Since i have used custome titleView.
I want it to be different. I tried by setting the title in backbaritem of the root view controller, but no use.
I can create a bar button item in my pushed controller and i can set it as leftbar item, But i want it like a normal back button. [Pointing towards backward]
- Is it possible to set title for the back button , if i have a custom titleView ?
- Is it possible to create a bar button item as like as default back button.[Pointing towards back , other than plain,border...etc] ?
Regards,
Balaji R.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我得到了它。
即使我为导航项设置了自定义 titleView,我仍然可以为同一导航项设置标题,而不会在导航项中显示标题。但当其他一些控制器推入后退按钮时,它将作为后退按钮的标题。
所以,现在我在导航项中同时拥有 title [用于后标题显示] 和 titleView [自定义视图]。
谢谢,
巴拉吉·R。
I got it.
Even though i have custom titleView for my navigation item, I can still set the title for the same navigation item where it wont be taken for the title display in navigation item . but it will taken as the title of the back button when some other controllers are pushed into it.
So , Now i'm having both title [Used for back title display] and titleView [custom view] in the navigation item.
Thanks,
Balaji R.