返回带有标题和内容的导航项背景图片
我知道如何添加带有图像的后退导航按钮或更改图块,但我还没有看到任何带有背景图像及其标题的示例 (@"back"
)。
我可以添加具有自定义背景图像和标题的自定义 UIButton 吗?
I know how to add back navigation button with image or change the tile but I haven't seen any example with background image and its title (@"back"
).
Can I add a custom UIButton with custom background image and title?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这,我最终在代码中所做的实际上是有效的!
只需更新不同外观的“forState”和“barMetrics”值即可。
This, what I finally did in my code actually works!!!
Just update "forState" and "barMetrics" values for different appearances.
我不确定你的意思(@back),但这是我如何能够在后退按钮和 UINavigationBar 中获取图像:
这是一个 ios 5 解决方案。感谢以下来源:
http://www.whypad.com /posts/ios-5-problem-setting-image-for-uinavigationbar/1011/
http://iosdevelopertips.com/用户界面/ios-5-customize-uinavigationbar-and-uibarbuttonitem-with-appearance-api.html
I'm not sure what you mean by (@back) but here is how I was able to get an image in the back button and the the UINavigationBar:
This is an ios 5 solution. Thank you to these sources:
http://www.whypad.com/posts/ios-5-problem-setting-image-for-uinavigationbar/1011/
http://iosdevelopertips.com/user-interface/ios-5-customize-uinavigationbar-and-uibarbuttonitem-with-appearance-api.html