Universal app experiences?

Discussion in 'iOS Programming' started by thedollarhunter, Sep 22, 2011.

  1. thedollarhunter, Sep 22, 2011
    Last edited: Sep 29, 2011

    thedollarhunter macrumors member

    Joined:
    May 9, 2011
    Location:
    UK
    #1
    Any pointers or experiences good or bad with building a universal app, in particular one that uses OpenGL ES?

    I am planning to

    Add another nib file with ~ipad.

    Check UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad to detirmin iPad or iPhone/iPod.

    Set contentScaleFactor if it is available.

    Code:
    if ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)] &&
    		([UIScreen mainScreen].scale == 2.0)) {
    		//NSLog(@"Retina display");
    		self.contentScaleFactor=2.0f;//iphone retina scale factor
    	} else {
    		//NSLog(@"Regular display");
    	}
    Anything else that needs taking care of?
     
  2. ArtOfWarfare macrumors G3

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    The game I made works great whether on an iPhone or an iPad, even though I only designed it with the iPhone in mind. The controls are just a simple touch left, middle, or right side of the screen, so that simplicity might be part of why it works so well on each device.
     
  3. thedollarhunter thread starter macrumors member

    Joined:
    May 9, 2011
    Location:
    UK
    #3
    I did the opposite which was definitely a rookie mistake :mad:

    Scaling an iPad game down using glViewport is great but not if you fail to change the controls to suite the smaller screen!

    I now know what I am doing this weekend :D


     

Share This Page