Question

I remember in Xcode 4.1, when I choose to create a universal application it would create separate iPhone/iPad/Shared folders with 3 separate appdelegate, with subclassing etc.

Just tried this on Xcode 4.2, and I see that it's not creating these folders. Am I doing something wrong or has this changed? Am I supposed set all this up myself, or Xcode 4.2 has introduced a better approach for universal apps that I am not aware of?

Was it helpful?

Solution

It has changed in the latest versions. As opposed to creating separate files for iPhone and iPad, Xcode only creates separate xibs(or storyboards) and uses the following to tell the application to change views if the device is an iPad. This allows you to only have to write all your code once.

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top