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

前端 未结 2 833
半阙折子戏
半阙折子戏 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:27

    It might be possible as you might have not set layout constraints. The below link will help you how to set constraints. In the below link i've used size class but it is not necessary for you to use sane view, similar constraints can be applied to the storyboard structure you have used.

    Hi please visit below link:
    iOS 8 Autolayout with Size Classes

    Advance auto layout Constraints:
    Adjust Center of Measure in Xcode 6

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题