UINavigationBar 上缩进后退按钮?
有没有办法缩进 UINavigationBar 上的默认后退按钮?基本上我只想将其向右移动大约 10 点。
谢谢
Is there any way to indent the default back button on a UINavigationBar? Basically I just want to move it about 10pts right.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
隐藏默认的后退按钮对我有用,使用 UIButton,您可以随意设置样式:
Hiding the default back button worked for me, using a UIButton which you can style anyway you want:
最好隐藏默认的后退按钮并在导航栏上添加自定义后退按钮。
一切顺利。
Better hide the default back button and add a custom back button on the navigation bar.
All the Best.
我认为没有简单的方法。但是您可以获得导航栏对象:
...并且可能迭代它的子视图。我想您可以根据它的框架属性确定哪个子视图是后退按钮。
I don't think there is an easy way. But you could get the navigation bar object:
...and maybe iterate through it's subviews. I presume you could determine which subview is the back button based on it's frame property.
如果有人遇到这个线程并且正在使用 iOS5,这似乎对我有用:
If anyone comes across this thread and is using iOS5, this seemed to work for me: