Problem setting autosizing in interface builder

后端 未结 3 740
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 07:21

I have two viewControllers, one is a subclass of UIViewController (autoresizes correctly), the other one is a subclass of a subclass of UIViewController.
I did a layout in I

3条回答
  •  半阙折子戏
    2021-02-05 08:03

    I have a simplified answer:

    1. Goto IB
    2. Click on the 'ViewController'
    3. Goto 'Attributes Inspector'
    4. Change 'Size' to 'Freeform' (something other than 'Inferred')

    What you have is this:

    enter image description here

    Change 'size' to 'freeform' & try now!

    enter image description here

    Now, it works! Go back & change it to 'Inferred' after you have set the Autoresizing masks.

提交回复
热议问题