设置“标题” UIPopoverController的? [英] Setting the "title" of a UIPopoverController?

查看:95
本文介绍了设置“标题” UIPopoverController的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确信这里有一些显而易见的东西,但是我知道popover控件可以有titles,一个标题区域在内容视图上方有一行文本(例如iWork中的Tools弹出窗口)。

I'm sure there's something obvious I'm missing here, but I know that popover controls can have "titles", a header area that has a line of text above the content view (e.g. the "Tools" popover in iWork).

如何在我自己的popovers中添加它?

How can I add this in my own popovers?

谢谢。

推荐答案

如果您正在使用UIPopoverController,只需输入 contentViewController 将是a UINavigationController ,并设置其最深的视图控制器的标题

If you're using a UIPopoverController, just make its contentViewController to be a UINavigationController, and set the title of its deepest view controller.

如果你正在使用UIActionSheet,它有一个 title 属性(使用 -initWithTitle初始化时应注意:... 。)

If you're using a UIActionSheet, it has a title property already (which you should notice when initializing with -initWithTitle:….)

这篇关于设置“标题” UIPopoverController的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆