简体   繁体   English

自定义UINavigationBar以使其不可见,但保持按钮可见

[英]Customise UINavigationBar to make it invisible, but keep buttons visible

I know that iOS 5 allows for UINavigationBar customisation, but I'm not sure it does what I need. 我知道iOS 5允许自定义UINavigationBar,但我不确定它是否可以满足我的需求。 I want to remove the bar entirely, or at least make it invisible, but keep the buttons (backButton, rightBarButton, etc) and replace them with my own images. 我想完全删除该栏,或者至少使其不可见,但保留按钮(backButton,rightBarButton等)并将其替换为我自己的图像。 I could implement actual buttons, but keeping the navBar is far more convenient as I want to use its behaviour. 我可以实现实际的按钮,但是保留navBar更加方便,因为我想使用它的行为。 Is this possible? 这可能吗? Many thanks. 非常感谢。

You can set the navBar to hidden and handle all of the navigation yourself. 您可以将navBar设置为隐藏并自己处理所有导航。 The navigation controller is still there, but navigation is overridden with your custom buttons. 导航控制器仍在那儿,但是您的自定义按钮会覆盖导航。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM