2

I am making an iphone app using the latest Xcode i.e Xcode 4.5.1. The current XIB files are suited for iphone 5. I am not sure how to make the app that would work on both the screen sizes i.e 3.5 and 4 inch??

Is it that I have too use two different sets of *XIB*s??

ExpertRK
  • 51
  • 1

2 Answers2

0

Check out this answer, it's the approach I took.

Basically, create two different xibs or storyboards and choose which one to use at application launch.

Community
  • 1
  • 1
Stenerson
  • 952
  • 8
  • 17
0

2 different xib is a kind of solution but you need to play with AutoResizing property of View if you don't want to create different xib's. Also you need to use Default@2x.png for iPhone4 and Default-568@2x.png for iPhone5, these are the SplashScreen images to identify whther app is running on iPhone4 or iPhone4.

If you have created iPhone4 compatible application then just add Default-568@2x.png image. Your application will work for iPhone5. But you need to handle UI for this. For example if you are using UITableView so just use Flexible height instead of hardcore frame.

user1988
  • 811
  • 2
  • 8
  • 17