Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming For Both iPhone Screen Sizes [duplicate]

Possible Duplicate:
iOS 6 apps - how to deal with iPhone 5 screen size?
Same xib for iPhone4 and iPhone5 possible?

I have been making my application and this whole time it has been with the iPhone 5 screen size. I forgot all about the iPhone 4, I even have it, dumb me... How would I go about this? Now that I have coded for the iPhone 5, how would I my code work on both screen sizes?

Here is a mockup of the kind of problem i'm having. In the second picture the slider is cut off the screen on the smaller device

4 inch screen with all interface elements 3.5 inch screen with interface cut off


1 Answers

The best advice I can give you is to try out the autosizing/auto-alignment settings on you XIB. This is your best bet to avoid setting up separate views for each device.

In the example you gave you can use the settings in Xcode that look like this:

enter image description here

Adjust them so that your slider's origin is the bottom of the screen. Play around with the settings for each UI element until everything looks right.

like image 79
woz Avatar answered Sep 15 '26 10:09

woz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!