让 UIBarButtonItem 指向右侧的标准方法?

发布于 2024-08-10 17:56:13 字数 132 浏览 4 评论 0原文

当新的视图控制器被推入导航堆栈时,标准支持带有前一个视图控制器标题的后退按钮。该按钮“指向”左侧而不是圆角矩形。

是否有标准方法来创建“指向”右侧的 UIBarButtonItem?该按钮将用作 rightBarButtonItem。

When a new view controller is pushed onto the navigation stack, there is standard support for a back button with the title of the previous view controller. This button "points" to the left rather than having a rounded rectanglar shape.

Is there a standard way to create a UIBarButtonItem that "points" to the right? This button would be used as the rightBarButtonItem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤檠 2024-08-17 17:56:13

使用 Three20 库,您可以轻松完成此操作,而无需自己创建图像(并且它将根据需要正确调整大小)在您的文本上):

此屏幕截图来自 Three20 附带的示例应用程序。

Using the Three20 library you can do it easily without creating an image yourself (and it will size up correctly depending on your text):

This screenshot comes from the example application that comes with Three20.

偏爱自由 2024-08-17 17:56:13

您可以使用与 iPhone UI 小部件一起浮动的 PNG 文件之一(示例)。将左指按钮在 Photoshop 或其他图像编辑工具中水平翻转,使其指向右侧。

然后将 UIButton 插入到 rightBarButtonItem 视图中,使用水平翻转的小部件作为其图像属性。

You could use one of the PNG files floating around with iPhone UI widgets (example). Take the left-pointing button and flip it horizontally in Photoshop or another image editing tool to make it point right-wards.

Then insert a UIButton into the rightBarButtonItem view, using the horizontally-flipped widget as its image property.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文