Reputation: 2162
I've been looking for a couple of hours for answers for this problem on both Google and Stackoverflow, and none of the suggestions worked so far, so maybe one of you can tell me what's the problem.
Here's exactly what I'm doing, step by step:
Insert the following code inside the controller's viewWillAppear method
UIImage *navigationBackground = [[UIImage imageNamed:@"test.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[self.navigationController.navigationBar setBackgroundImage:navigationBackground forBarMetrics:UIBarMetricsDefault];
After the application is launched on the simulator (iOS 5.1), the bar has a red background, which means that iOS loaded the low resolution image, not the high resolution one.
What am I doing wrong here? Am I missing a step? Do I have to change the plist file?
Thanks
Upvotes: 0
Views: 198
Reputation: 2779
The simulator is by default in non-retina mode. Make sure you choose iPhone (Retina) from Hardware/Device menu.
I cannot see anything obviously wrong in your posted code.
Upvotes: 1