0
我有一个导航控制器作为初始视图控制器基于故事板的应用程序。在哪里调用setBackgroundImage:forBarMetrics:在Storyboarded应用程序的UINavigationBar中?
我想使用setBackgroundImage:forBarMetrics:方法将导航栏的背景设置为图像,但我不确定在哪里调用它。
我可以继承UINavigationController并使用viewDidLoad方法来调用它,但不鼓励子类化UINavigationController。我想我应该继承UINavigationBar并重写一些初始化方法?
感谢,
史蒂夫