UINavigationItem:创建一个“nextBarButtonItem” (= 带箭头的 rightBarButtonItem)
UINavigationItem 中有 3 个 Bar-Buttons:
- backBarButtonItem
- leftBarButtonItem
- rightBarButtonItem
但没有“nextBarButtonItem”(= rightBarButtonItem 带箭头)。我怎样才能创建它?我需要自己的带有箭头的图像吗?如何将图像放入 rightBarButtonItem 中?或者有没有更好的没有图像的方法?
there are 3 Bar-Buttons in the UINavigationItem:
- backBarButtonItem
- leftBarButtonItem
- rightBarButtonItem
But there is no "nextBarButtonItem" (= rightBarButtonItem with arrow). How can I create it? Do I need an own image with an arrow? How can I put the image in the rightBarButtonItem? Or is there a better way without image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
唯一的方法是使用带有自定义图像和下一个按钮外观的栏按钮项目,并将其设置为
rightBarButtonItem
。由于导航控制器的工作方式,Apple 不提供任何nextBarButtonItem
功能。如果您仔细观察 iPod 应用程序中的“正在播放”按钮,它也是定制设计的。
The only way is to use a bar button item with a custom image with that next-button look, and set it as
rightBarButtonItem
. Apple doesn't provide anynextBarButtonItem
functionality due to the way a navigation controller works.If you look carefully at the Now Playing button in the iPod app it's also custom-designed.
检查用于为 iPhone 创建 Facebook 应用程序的 Three20 库。
https://github.com/facebook/ Three20
Check three20 library used to create Facebook app for iPhone.
https://github.com/facebook/three20