将自定义导航栏分配给 UINavigationController
可能的重复:
自定义 UINavigationBar 背景
我正在应用程序委托中以编程方式创建我的 uinavigation 控制器。我有一个类,它是 UINavigationBar 的子类,并希望将其指定为控制器的导航栏。在 IB 中,我只需选择控制器及其栏并将类从默认类更改为我的自定义类。但是我不知道如何在代码中执行此操作。任何帮助将不胜感激。
Possible Duplicate:
Custom UINavigationBar Background
I am creating my uinavigation controller programatically in the application delegate. I have a class that subclasses UINavigationBar and would like to assign that as the controller's navigation bar. In IB, I would just select the controller, its bar and change the class from the default to my custom class. However I don't know how to do this in code. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我记得我使用了来自 这篇 帖子
我猜这也正是您正在寻找的内容。
I just started typing out a detailed reply when I remembered that I used my custom navigation controller from this post
Guess it is exactly what you're looking for as well.