Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This is where the code paths for the iPhone and the iPad are going to intersect—in the App Delegate. Because we’re migrating an existing iPhone application, we already have an AppDelegate and it’s set up to add our RootViewController to the window when the application launches.
Now that we’ve added iPad-specific views, we need to update our AppDelegate to add the correct one to the window depending on the device. iOS makes it easy to determine which device you’re on through a macro named UI_USER_INTERFACE_IDIOM(). This returns a constant that tells you the type of device your application is running on; we can use this to figure out which view controller to show in the window.
Now it’s ready to run...