search

Home  >  Q&A  >  body text

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?

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. ?

世界只因有你世界只因有你2809 days ago694

reply all(1)I'll reply

  • 某草草

    某草草2017-05-02 09:37:50

    In viewDidAppear:或者viewDidLayoutSubviews中打印才是正常,因为在viewDidLoad:, the view is only loaded and not laid out

    reply
    0
  • Cancelreply