Note that there are some explanatory texts on larger screens.

plurals
  1. POnavigationBar Background Image on iPad with iOS 5 in landscape mode
    primarykey
    data
    text
    <p>Im struggling with this for a while and i cant find anyone with a related issue. My problem is that the background image that gets loaded on for the landscape mode on the iPad its not the correct one (it loades the portrait version of the image). On the iphone or iPod it work as its supposed to.</p> <p>The code im using on my AppDelegate file is the following:</p> <pre><code>if ( [[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 5.0 ) { // Create resizable images UIImage *gradientImageP = [[UIImage imageNamed:@"header"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; UIImage *gradientImageL = [[UIImage imageNamed:@"header-Landscape"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; [[UINavigationBar appearance] setBackgroundImage:gradientImageP forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setBackgroundImage:gradientImageL forBarMetrics:UIBarMetricsLandscapePhone]; [[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent]; [[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:0 green: 0 blue:0 alpha:1]]; } </code></pre> <p>The problem is in this line?</p> <pre><code>[[UINavigationBar appearance] setBackgroundImage:gradientImageL forBarMetrics:UIBarMetricsLandscapePhone]; </code></pre> <p>My images names are the following:</p> <ul> <li>header-Landscape~iphone.png</li> <li>header-Landscape@2x~iphone.png</li> <li>header-Landscape~ipad.png</li> <li>header~iphone.png</li> <li>header@2x~iphone.png</li> <li>header~ipad</li> </ul> <p>Edit: Screenshots of the problem on the navigation bar:</p> <ul> <li>iPhone portrait: <a href="http://imageshack.us/photo/my-images/200/iphoneportrait.png/" rel="nofollow">http://imageshack.us/photo/my-images/200/iphoneportrait.png/</a></li> <li>iPhone landscape: <a href="http://imageshack.us/photo/my-images/193/iphonelandscape.png/" rel="nofollow">http://imageshack.us/photo/my-images/193/iphonelandscape.png/</a></li> <li>iPad portrait: <a href="http://imageshack.us/photo/my-images/62/ipadportrait.png/" rel="nofollow">http://imageshack.us/photo/my-images/62/ipadportrait.png/</a></li> <li>iPad landscape: <a href="http://imageshack.us/photo/my-images/200/ipadlandscape.png/" rel="nofollow">http://imageshack.us/photo/my-images/200/ipadlandscape.png/</a></li> </ul> <p>Anyone with this issue? Im open to ideas on how to solve this, tkz</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload