Alex Rivera | Logout

Custom background image on UIToolbar in IOS5 SDK

Asked 2011-06-08T18:34:33.247
26

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 still works.

[self.bizToolbar insertSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"navbar-iphone.png"]] autorelease] atIndex:0];

Anybody encountered this yet on IOS 5?

Edit
Report

1 Answer

3

This method is not documented and relies on specific subviews structure of UIToolbar which can be changed from version to version. So that exactly what probably happened with iOS5 release

P.S. If you check updated UIToolBar class reference you'll find another way to customize UIToolBar

answered 2011-06-08T18:38:58.997

Your Answer