Layout issue, Autolayout enabled but doesn't seem to work

前端 未结 2 834
半阙折子戏
半阙折子戏 2020-12-12 06:26

Below is my app when run on iPhone 6 simulator

As you might have guessed it looks good on iPhone 5.

Autoresize is on, but I\'m not sure i fully grasp the c

2条回答
  •  隐瞒了意图╮
    2020-12-12 06:46

    Auto layout is on but you are not using it. You need to add constraints so that when the main view is resized to fit the screen, the table view is resized along with it. Otherwise, it just stays at the same size you designed it (which happens to be the right size for an iPhone 5). These devices are different sizes; the idea of auto layout is to cope with that difference. Use it.

提交回复
热议问题