How to design single storyboard file that supports

2019-09-20 06:25发布

问题:

I am using storyboard and xcode 4.6 for designing Iphone app. I have very complex viewscontrollers and some of the subviews(like scrollview's and autocomplete tablviews) have generated dynamically. When app build for iphone 4 everything works fine. But, when using Iphone(retina-4 inch) simulator, I noticed that there is space at the top and bottom of the screen and also some of the subviews (like scrollviews and autocomplete tableviews ..) misplaced and covering other subviews in that viewcontroller. I tried to search and found some are suggesting to design/load two xib files based on screen size. I have enabled both autoresize masks and autolayout, but still the problem persists.

How to design a single storyboard file that is feasible for both Iphone-4 and Iphone-5.

Reference:How to develop or migrate apps for iPhone 5 screen resolution?

Update attached screenshot: Storyboard file

Thanks in advance...

回答1:

use the button in the picture below to toggle between retina 4 in and 3.5 inch. use the autosizing tool under the size inspector on the top right to get views to position themselves correctly.