I have an iOS 7 only app that uses UIAppearance to style the UINavigationBar throughout the app.
I have the following code in an AppDelegate application:
[[UINavigationBar appearance] setBackgroundImage:redImage forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearanceWhenContainedIn:[MFMailComposeViewController class], nil] setBackgroundImage:blueImage forBarMetrics:UIBarMetricsDefault];
However, MFMailComposeViewController appears with a redImage background!
The documentation states the following:
Important: the presentation hierarchy of this class is private, and you should not modify it. However, you can customize the appearance of the instance using the UIAppearance protocol.
Thus, there is no reason for the above to not work, and I am 100% sure that redImage and blueImage are different color images.
Has anyone else experienced this issue? I suppose this is a bug in iOS 7, but I did not have time to test iOS 6 (I get these results using iPad 4).
source share