Domanda

I am hoping someone can help me out with this one. I have an app that I am trying to update to get rid of the letterbox look when running on iPhone 5. I have added a Default-568h@2x.png to the project and the application seems to scale correctly. The splash screen on either device looks correct, however I have a toolbar on my "Home" screen that I can't seem to get in the right place. If I get it right for 5, I can't see it on 4s, and if I get it right for 4s, it is very low on 5.

Am I missing something? Do I need to manually move the toolbar that is at the top? And will I need to move all the controls around on all of the screens in the app?

Any advice is appreciated!

Thanks

È stato utile?

Soluzione

Here are some tips on using Interface Builder to handle resizing.

  1. Take advantage of the Simulated Metrics in Interface Builder, as shown here: Attribute Inspector, Simulated Metrics, Size: Retina 4 Full Screen
    To do so, select your top-level View, and open the Attribute Inspector. Then, you can select different sizes and orientations to see how your view responds.
  2. Select the Autosizing options as shown here:
    Size Inspector, View, Fixed top margin
    In your case, you want a fixed margin above, but a flexible margin below. Note that this is the opposite of the default for a toolbar because the iOS convention is for toolbars to be at the bottom of the view.
  3. Realize that resizing due to rotation and different screen sizes can often be handled the same way. (Thus, if you handle portrait and landscape orientations using Autosizing, iPhone5 layout usually takes care of itself.)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top