I am adding an image to a UIToolbar's background in the App Delegate using this code:
[[UIToolbar appearance] setBackgroundImage:
[UIImage imageNamed:@"toolbarbackground.png"]
forToolbarPosition:0 barMetrics:UIBarMetricsDefault];
The image is 768 pixels in width (the size of the iPad screen width in portrait orientation). When I rotate to landscape the image does not stretch to fill the new screen width (1024 pixels). How can I use a custom background image on a UIToolbar that stretches to fit the screen when rotating?