Junior — Middle
At what stage of the ViewController's lifecycle can you determine the size of its displayed view?
sobes.tech AI
Answer from AI
The size of the displayed view in UIViewController can be reliably determined in the viewDidLayoutSubviews() method.
At this stage of the controller's lifecycle, all subviews are already laid out and have correct sizes, so you can get the exact size of the view through the view.frame or view.bounds property.
Before this point (for example, in viewDidLoad), the sizes may not be set yet or may be incorrect.