My opinion:
self.window.rootViewController changes the size of rootViewController.view depending on the height of the status bar
But if you use addSubview, it will not
For example, if you set the RootViewController to a NavigationController, the navigation controller will be (0,0,320,480);
but if you set the RootViewController to a common UIViewController, the navigation controller will be (0,0,320,460);
if you use addSubview: two view managers will be (0,0,320,480)
And if there is an In-call-StatusBar. this will also change for you when you use setRoot ... if you use addSubview, the size of the subview will not change
perform some tests with a different presentation frame color
aelam Sep 10 2018-12-12T00: 00Z
source share