objective-c - When creating a new viewController, the code prints the width and height of the built-in xib. Why is it different from the actual display on the interface?
世界只因有你2017-05-02 09:35:50
0
1
693
When you create a new ViewController, it comes with xib. The width and height of self.view printed in viewController.m is 600*600, but the interface display effect, constraint layout and the effect of running on the simulator are normal. ?
In
viewDidAppear:
或者viewDidLayoutSubviews
中打印才是正常,因为在viewDidLoad:
, the view is only loaded and not laid out