UINavigationBar 以按钮为标题.

UINavigationBar with buttons as title.(UINavigationBar 以按钮为标题.)

本文介绍了UINavigationBar 以按钮为标题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经进行了一些挖掘,但似乎没有得到任何有用的东西.

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.或者如果苹果会给它一个不"

我有一个通过 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 以按钮为标题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:UINavigationBar 以按钮为标题.

基础教程推荐