I’m using the appearanceWhenContainedIn
method on certain UI elements that I want to customise in my iOS 6 app. The problem I found is that none of my customisations are applied if I try to provide more than one container class, like so:
// Works neither for toolbar nor navbar items
[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], [UIToolbar class], nil]
// Works fine (but only for navbar items, obviously)
[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil]
The official docs say that the parameter for this method can be a nil-terminated list of multiple classes, but in my case it never works the way it should. Am I missing something here?