0

I am using the Xcode version 6.3.2, which is the most recent one at the moment.

I already have an working iPhone application, build with that very same version of Xcode. It contains a page view controller inside a standard view controller. Moreover it provides the user a settings page accessible from the navigation bar, if thats important.

Basically each day of the page view controller represents one day.

For the new iPad version I would like the "pages" content showing up next to each other.

  1. Is there an easy way to accomplish this? How do I have to adjust the code when running on an iPad?

  2. In general, what do I need to change if the iPad version uses a different view controller for the main view then the iPhone app?

    Do I have to create a new ViewController class? If so, how would I tell the application to use the other vc if running on an iPad instead of an iPhone?

Thanks in advance, KlixxOne

FlixMa
  • 944
  • 1
  • 7
  • 20

1 Answers1

0

You should be able to use the following information for 1.:

NSString *iOSVersion = [[UIDevice currentDevice] systemVersion];
NSString *model = [[UIDevice currentDevice] model];

For 2. it really depends on your existing logic/setup. You could either customise your existing setup to be dynamic based on the device (ie. treat iPads differently). If the changes are significant between iPad and iPhone I'd suggest creating a new view controller and determine which to display programmatically using the details above.

  • so am I right if I say the way to go is to set the initial view controller programmatically as described here: http://stackoverflow.com/a/14926009/3763202 – FlixMa May 30 '15 at 20:42
  • Yes that approach should work based on the description of your setup (i.e. A single VC with multiple pages within it). –  May 30 '15 at 20:56