converting to iPad

Discussion in 'iOS Programming' started by ppn, Aug 28, 2011.

  1. ppn macrumors member

    Joined:
    Oct 31, 2010
    #1
    I've recently converted my iPhone app to a universal app. Xcode created the MainWindow-iPad.xib for me automatically but I'm having trouble setting a new background for the ipad version.

    In the MainViewController, I've set the following

    Code:
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
            background = [UIImage imageNamed: @"default.png"];
        } else {
            background = [UIImage imageNamed: @"default_ipad.png"];
        }
    I've checked and it calls the default_ipad.png file but when it loads the image is shrinked to the iphone size and set at the upper left corner. Is there a way to have it call another xib file or resize it?

    I'm suspecting it has something to do with the AppDelegate file where it initially sets
    Code:
    [window addSubview:navigationController.view]; 

    Does anyone know a good tutorial on how to convert your iphone app into an ipad app?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Assuming background is a UIImage, how is its frame set?
     

Share This Page