I have an iOS 7 only application that uses UIAppearance to style the UINavigationBar's throughout the app.
I have the following code in my AppDelegate:
[[UINavigationBar appearance] setBackgroundImage:redImage forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearanceWhenContainedIn:[MFMailComposeViewController class], nil] setBackgroundImage:blueImage forBarMetrics:UIBarMetricsDefault];
However the MFMailComposeViewController appears with the redImage background!
The documentation says the following:
Important: The view hierarchy of this class is private and you must not modify it. You can, however, customize the appearance of an instance by using the UIAppearance protocol.
So there is not reason that the above shouldn't work and I am 100% sure thatredImage
and blueImage
are different coloured images.
Has anyone else experienced this issue? I'm guessing it is a bug in iOS 7 but I haven't had time to check on iOS 6 (I'm getting these results by using an iPad 4).