UINavigationBar,按钮作为标题。 [英] UINavigationBar with buttons as title.
问题描述
我做了一些挖掘,似乎无法获得任何有用的东西。
I have done some digging and can't seem to get anything useful.
我想要做的是非常基本但我不确定它们是否:
What I am trying to do is pretty basic but I'm not sure if their is:
1。一种更简单的方法
2。或者,如果Apple会给它一个不行
我有一个通过UINavigationController控制的视图(很明显来自这篇文章的标题)它有一个对象/视图。
I have a view that is controlled via UINavigationController (obviously from the title of this post) and in it has an object/view.
视图内容相当拥挤。没有真正的拥挤,但没有更多的空间舒适地适应事物。
The view is fairly congested already with content. Not really congested but no more room to fit things comfortably.
用户需要能够使用不同的启动次数(1-5)对此对象进行评级。
The user needs to be able to rate this object by using a different number of starts (1-5).
我认为这种情况发生的理想方式是在UINavigationBar标题位置设置5个星形按钮(当然是图像)(居中)。
The ideal way I would see this happening would be to have 5 star buttons (with images of course) set in the UINavigationBar title position (centered).
所以看起来像这样:
___________________________________
| |
| Back * * * * * Action |
|_________________________________|
| |
| view down here |
| |
任何输入都非常非常感谢并且一如既往,谢谢你们你的时间!
Any input would be very much appreciated and as always, thank you for your time!
推荐答案
您可以使用5星评级功能创建自定义小部件并将其添加到navigationItem
You can just create your custom widget with the 5 star rating functionality and add it to the navigationItem
self.navigationItem.titleView = customWidget;
这篇关于UINavigationBar,按钮作为标题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!