user3723418
user3723418

Reputation:

xCode layouts not scaling correctly

I am trying to create a universal app capable for all devices, but it is not scaling correctly. Below (the correct version) is a screenshot of my iPhone 5s, and the one that is out of scale is a screenshot of my iPad 2.

the correct version

the incorrect version

Am I doing it correctly making it scale? Or should I use 2 storyboards and assign one to iPhone, and one to iPad?

Upvotes: 0

Views: 292

Answers (2)

Dhrumil
Dhrumil

Reputation: 3204

The better way of doing this is making two separate storyboards. One for iPhone and other for iPad. This offers you the flexibility to play with both in your own ways and there are many cool things that you can work out with iPads. And to do that, you need separate storyboards in your app. It eliminates the dependency between the look and feel of both the devices.

For making two storyboards the easy way, see this :

How/whether to make a universal storyboard in Xcode

For the selection of appropriate storyboards based on devices, check this :

Selecting different storyboards based on device type

This might help you immensely.

Upvotes: 1

souvickcse
souvickcse

Reputation: 7804

Its good to make two different xib. But for small screen you have to apply proper auto sizing then it will not be a problem. You can use this for example enter image description here

For Section 1:enter image description here

For Section 2:enter image description here

For Section 3:enter image description here

and

For Section 4&5:enter image description here

Upvotes: 3

Related Questions