view controller frame size in child controller

后端 未结 1 1809
北恋
北恋 2021-02-04 18:12

I am implementing UIViewcontroller containment. In the example below I set the frame size of the childcontrollers in the rootcontroller. The child view appears as the size I hav

1条回答
  •  [愿得一人]
    2021-02-04 18:48

    View frames are not actually useable in viewDidLoad; you should move all of your geometry-manipulating code into viewWillAppear. The system will clobber any changes you set in viewDidLoad between there and when it's about tom come on screen.

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