ContentInset different for UITableView on iOS10 and iOS11

Originator:stefan.gugarel
Number:rdar://33874488 Date Originated:08/14/2017
Status:Closed Resolved:
Product:iOS + SDK Product Version:iOS 11 Beta 5
Classification:UI Reproducible:Always
 
Area:
UIKit

Summary:
This is a little more UITableView example which shows that the contentInset needs to be set differently on iOS10 and iOS11. 

Following elements on screen:
Brown: Own Navigation View
Yellow: Hidden Toolbar - can be swiped up and down
Green: TableView Cells

Steps to Reproduce:
1) Run the sample on iOS 10
2) You'll notice that the hidden toolbar has the correct inset
3) Now rund the sample on iOS 11
3) You'll notice that the hidden toolbar is not correct anymore (white gap)
4) Now toggle comment between line 19 and 16 in ViewController.swift
5) Run sample on iOS 11 and you'll notice that it is shown correctly now

Expected Results:
ContentInset should be the same on iOS 10 and iOS 11

Observed Results:
ContentInset needs to be different on iOS 11

Version:
iOS 11 Beta 5

Notes:
Please have look at line 88. This is the logic for hiding and showing toolbar. Computed properties on line 27 and 32 need to be modified as well.

Configuration:

Comments

I'm closing this now. See Answer from Apple:

Engineering has provided the following feedback regarding this issue:

In iOS 11, UIScrollView has new behaviors to automatically adjust its content inset to include the safeAreaInsets, which represent overlap by things like the status bar, navigation bar, and toolbar. In this sample app, the scroll view is automatically receiving an adjustedContentInset of 20 pt on the top due to the status bar’s contribution to the scroll view’s safeAreaInsets. You can change this behavior using the contentInsetAdjustmentBehavior property on UIScrollView. Please see the WWDC 2017 session “Updating Your App for iOS 11” for more information: https://developer.apple.com/videos/play/wwdc2017/204/

Thank you for your feedback. Engineering has determined that this issue behaves as intended.

We are now closing this bug report.

By stefan.gugarel at Aug. 16, 2017, 8:30 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!