Xcode - Adapt/fill screen for iPad mode

Asked

Viewed 36 times

0

I started learning to code in Xcode recently. After seeing some tutorials, I started working on a demo of an app whose initial menu features 5 buttons positioned vertically in a stack and a side image as shown in the following image:

inserir a descrição da imagem aqui

This is the iPhone preview. Not much to say. The elements are perfectly positioned as you wanted.

However, when I preview in iPad mode, the story is different:

inserir a descrição da imagem aqui

As you can see, the elements are poorly positioned. And the size remains instead of adapting to this larger screen.

I wonder how I can get around this problem.

1 answer

1

Dude, you did the auto layout?

Give a look why the auto layout serves precisely for this. Adapt the screen to all devices or in the case of a stackView vc could make a size-class, but first checks the auto layout.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.