Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add contentInsetAdjustmentBehavior property to MGLMapView #12143

@1ec5

Description

@1ec5

In iOS 11.0, UIViewController.automaticallyAdjustsScrollViewInsets is deprecated in favor of UIScrollView.contentInsetAdjustmentBehavior. automaticallyAdjustsScrollViewInsets has always been a bit of a pain for us, versus how macOS handles the same configuration option, because it’s a property on the containing view controller instead of the view itself. (We have to crawl up the responder chain looking for the view controller just to update MGLMapView’s internal constraints.) MGLMapView should implement its own contentInsetAdjustmentBehavior property that lets the developer indicate whether the MGLMapView itself should adjust the insets automatically.

We’ll have to keep support for UIViewController.automaticallyAdjustsScrollViewInsets around until that property is removed from the (Apple) iOS SDK, in case any developer depends on the currently documented behavior.

/ref #12142 #10485
/cc @friedbunny @julianrex

Metadata

Metadata

Assignees

No one assigned

    Labels

    archivedArchived because of inactivitygl-iosiOSMapbox Maps SDK for iOSmacOSMapbox Maps SDK for macOSrefactor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions