Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-22-2011, 01:38 AM   #1 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 19
hemcii is on a distinguished road
Exclamation navigationBar Background Image on iPad with iOS 5 in landscape mode

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 as seen here). On the iphone or iPod it work as its supposed to.

The code im using on my AppDelegate file is the following:

Code:
if ( [[[UIDevice currentDevice] systemVersion] floatValue] >= 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]];
}
Screenshots of the problem on the navigation bar:
My images names are the following:
  • header-Landscape~iphone.png
  • header-Landscape@2x~iphone.png
  • header-Landscape~ipad.png
  • header~iphone.png
  • header@2x~iphone.png
  • header~ipad

I already tryed using the solution with if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad), and event tought the background image on the landscape gets loaded, on portrait mode, that same img gets loaded as well so this doesnt work.


Anyone with this issue? Im open to ideas on how to solve this, tkz
hemcii is offline   Reply With Quote
Reply

Bookmarks

Tags
ios5, ipad, landscape, navigationbar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 390
14 members and 376 guests
13dario13, 7twenty7, buggen, EvilElf, glenn_sayers, j.b.rajesh@gmail.com, LunarMoon, morterbaher, n00b, QuantumDoja, sacha1996, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,673
Threads: 94,122
Posts: 402,906
Top Poster: BrianSlick (7,990)
Welcome to our newest member, morterbaher
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0