Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

iOS 11 Large gap above scroll view #190

@joshbernfeld

Description

@joshbernfeld

I was experiencing an issue on iOS 11 where there was a gap above the scroll view before the navigation bar. The solution for me was the following code. It seems that in addition to the content inset TLY was adding, iOS was then adding another inset which can be seen in the new variable adjustedContentInset

https://developer.apple.com/documentation/uikit/uiscrollview/2902259-adjustedcontentinset

This was my solution

if (@available(iOS 11.0, *)) {
    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions