2
votes

I have made a 4inch app using story board . However I found out that I have to support 3.5 inch screens as well. So I went to the storyboard and clicked on the button that switches the display size from 4inch to 3.5 since in 3.5 inch my app is cutoff at the bottom. However I finishes designing on 3.5 inch and went back to 4inch. The problem is that even in 4 inch the design is for 3.5 inch. How can I have a layout for 3.5inch and 4 inch? I am not using auto layout.

2

2 Answers

3
votes

You have two main options:

Use autolayout to auto rezie/move the views depending on the size of the screen.

Use 2 different storyboards and load one or the other depending on the size of the screen.

1
votes

using 2 storyboard is the only option to differentiate the device

#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

write the above code in app delegate above #import"appdelegate" and check condition in [method]- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

as

if(IS_IPHONE_5)

{

// load your iPhone5 storyboard

}

else
{

// load  other than iPhone5 storyboard

}