iOS 5 [UINavigationBar appearance] setBackgroundImage does not do work

后端 未结 3 1891
感动是毒
感动是毒 2021-01-13 10:24

I created a new test iOS5 project in Xcode 4.2 Build 4D199 and tried to set the appearance of the UINavigationBar as described above, but nothing happens.

相关标签:
3条回答
  • 2021-01-13 10:51

    viewDidLoad is the wrong place to be messing with the appearance proxy of a navigation controller's navigation bar. Do this sort of thing before the navigation controller is even created. In your app delegate's applicationDidFinishLaunching is a good place.

    0 讨论(0)
  • 2021-01-13 11:07

    Did you double-check if that Imagefile does exist?

    0 讨论(0)
  • 2021-01-13 11:09

    You will need to provide forBarMetrics: for this to work.

    0 讨论(0)
提交回复
热议问题