Search code examples
iosuser-interfaceinterface-builderiphone-5

Do I have to create two views for iPhone 4S and 5


Possible Duplicate:
How to deal with iPhone 5 screen size?

The new iPhone 5 has a 4 inch display.

In IB, I want to make my iPhone 5 view different to my 4S. The 4S version needs a scroll view, but the 5 doesn't.

How can I create two views (with all connected outlets) in the same xib, one which is 3.5 inches, and one which is four inches?

Do I have to create a totally new xib and include it for iPhone5 ?

I am just a bit unclear on the approach.

(I have seen other questions which don't answer this particular question)


Solution

  • If you would like a completely different view for the iPhone 5 then yes you should use a different nib, however I would advise that you need not use different nibs and instead use autolayouts to autosize your views accordingly so that you can have 1 codebase working across multiple devices.