Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chen8002004

macrumors newbie
Original poster
May 22, 2011
26
0
I have developed an iphone graphics game using core animation. But I am not clear about how to make my application also possible to run on ipad. I know that the modification is just screen sizes and coordinates. How to modify my application so that different binaries can be generated for iphone, ipad or other apple devices from the same application? How to do it from architecture point of view?

My current application architecture: A view controller handles user input (such as touches). A separate game data class is owned by view controller and holds coordinates and other game information. A view class holds layers and plays animations on these layers.
 
It is a good document, but not detailed enough. For example, how could my code check to see which device I am running on? Is there any Macro for this?
 
It is a good document, but not detailed enough. For example, how could my code check to see which device I am running on? Is there any Macro for this?

There is a macro for this. Can't think of it right now though (of course). I'll see if I can find it.

Here it is: UI_USER_INTERFACE_IDIOM()

The you can use UIUserInterfaceIdiomPad or UIUserInterfaceIdiomPhone
 
Last edited:
It is a good document, but not detailed enough. For example, how could my code check to see which device I am running on? Is there any Macro for this?

There are. I didn't say it was complete, just a starting point for you to be able to see what is involved.

All in all it's really more complicated than that as you need to do things differently on iPhone, IPhone w/retina display and iPad. Which orientations will you support, etc..., etc... (EDIT:ChristianJapan beat me to it).

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.