多行UINavigationBar(Multi

编程入门 行业动态 更新时间:2024-10-18 14:21:13
多行UINavigationBar(Multi-line UINavigationBar)

对于模态对话,我希望有一个UINavigationBar,其中包含一个较小的任务描述,然后是传统的UINavigationBar - 这是iOS上许多系统应用程序中看到的样式。

实现这一目标的最佳方法是什么?

要查看我的意思,请参阅地图和联系人的这些示例屏幕截图(我选择iOS6屏幕截图,因为标准渐变扩展也是我想要的)。

For a modal dialogue, i would like to have a UINavigationBar with a smaller description of the task, followed by a traditional UINavigationBar - this is the style seen in many of the system apps on iOS.

What is the best way to achieve this?

To see what I mean, see these example screenshots from Maps and Contacts (I choose the iOS6 screenshots, because having the standard gradient expand is also something which I would like to have).

最满意答案

您发布的屏幕截图使用的是UINavigationItem prompt属性。

在视图控制器中,您可以执行以下操作:

- (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.prompt = @"Some message to appear at the top"; self.title = @"Some Title"; }

The screen shots you posted are using the UINavigationItem prompt property.

In your view controller you can do this:

- (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.prompt = @"Some message to appear at the top"; self.title = @"Some Title"; }

更多推荐

本文发布于:2023-07-04 17:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1026980.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多行   UINavigationBar   Multi

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!