Downloaded IOS5 SDK yesterday, and this code which I use to set my UIToolbar\'s background to a custom image stopped working. If I set the target to IOS4.3 and below it stil
Suppose you linked iOS5 beta SDK, you could do something like this
if([navigationBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)] ) {
//iOS 5 new UINavigationBar custom background
[navigationBar setBackgroundImage:image forBarMetrics: UIBarMetricsDefault];
}
To realize this, take a look at here iOS 4.3 to iOS 5.0 API Differences and search for "UINavigationBar.h"
or take a close look at the new method signature here setBackgroundImage:forBarMetrics:
Also here is the UIBarMetrics enum type
Hope this helps.