Search code examples
ios5uinavigationbarappearance

iOS5 UIAppearance protocol error when using [[UINavigationBar appearance] setOpaque:NO]


When using the new appearance proxy in iOS5 I receive the following error when trying to set the opaque property [[UINavigationBar appearance] setOpaque:NO];

'NSInvalidArgumentException', reason: '*** Illegal property type, c for appearance setter, setOpaque:'

Any suggestions or interpretations of the error are appreciated.


Solution

  • Have a look into the Developer Library: UINavigationBar Reference. You can not set the opaqueness of the UIAppearance object of a UINavigationBar. Only those things stated there. Happened to me as well, auto completion shows every possible choice, not just those supported by the control you are trying to modify.