Root view controller margins being set to odd values
<p>For some reason, my <code>UIWindow</code>'s <code>rootViewController</code> is having its margins set to 16 on the left and right, and 0 on the top and bottom.  Unfortunately I'm working with a legacy (read: non-storyboard) application that initializes everything manually.  This affects view controllers many layers deep, which insist on having a bottom margin of 0.</p>

<p>I have this code in <code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</code></p>

<p><strong>Code</strong></p>

<pre><code>self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.rootViewController = [[UIViewController alloc] init];
[self.window makeKeyAndVisible];

UIEdgeInsets insets = self.window.layoutMargins;
NSLog(@"Left %f, Right %f, Bottom %f, Top %f", insets.left, insets.right, insets.bottom, insets.top);
insets = self.window.rootViewController.view.layoutMargins;
NSLog(@"Left %f, Right %f, Bottom %f, Top %f", insets.left, insets.right, insets.bottom, insets.top);
</code></pre>

<p>Producing the following <strong>output</strong></p>

<pre><code>2016-08-03 18:10:24.280 app[426:182429] Left 8.000000, Right 8.000000, Bottom 8.000000, Top 8.000000
2016-08-03 18:10:24.280 app[426:182429] Left 16.000000, Right 16.000000, Bottom 0.000000, Top 0.000000
</code></pre>

<hr>

<p><strong>Edit</strong></p>

<p>I have finally found that this is the expected behavior.   When I push a new UIViewController, though, I am surprised that no bottom margin is added.  Is this expected behavior?  Should I never expect to have a bottom margin in iOS?</p>