Search code examples
storyboardiphone-5ios-universal-app

Loading very first view in storyboard based on the device model (iPhone 5 & iPhone 4S)


I am working on a universal app that needs to run on iPhone 5, iPhone 4S, iPad, iPad Retina and iPad mini.

Everything is working fine, except only one thing. I need to load my very first view based on the device the app is running (on the basis of iPhone 5 and iPhone 4S). I have designed separate views for iPhone 5 & iPhone 4S and using storyboard.

I know how to detect the device but I don't know how to load the very first view based on the device model.

My first view in embedded in Navigation Controller.

Does anybody know how this can be achieved?

Any help would be appreciated. Thank in advance.


Solution

  • It's time to answer my own question. I changed my logic, now instead of creating and loading two different views in storyboard; now I am setting up coordinates of my controls placed on the view. Now I can successfully detect the current device and setting my views appropriately.