Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Safe area#7

Merged
smaramba merged 2 commits into
swift_4from
feature/safe_area
Sep 24, 2017
Merged

Safe area#7
smaramba merged 2 commits into
swift_4from
feature/safe_area

Conversation

@bolismauro
Copy link
Copy Markdown
Contributor

This PR adds a back-compatible version of the safe area introduced in iOS 11.

The idea is to emulate this value for iOS < 11 using the AL values provided by the view controller.
When it is possible (iOS >= 11), the UIKit version is used. The reason why UIKit version is preferred is because this value will be especially important for the iPhone X, which only runs iOS 11 (or greater). UIKit version, in fact, also considers left/right constrains that basically always zero for other devices. According to Apple's videos, also, in the iPhone X the safe area is also used in table cells to avoid weird things when the iPhone is in landspace. While it is true that we don't generally support that orientation, using the UIKit version provides the support out of the box

@bolismauro bolismauro requested a review from smaramba September 24, 2017 13:37
@bolismauro bolismauro changed the base branch from master to swift_4 September 24, 2017 13:39
@smaramba
Copy link
Copy Markdown
Contributor

SGTM 👍

@smaramba smaramba merged commit 0675c4f into swift_4 Sep 24, 2017
@smaramba smaramba deleted the feature/safe_area branch September 24, 2017 19:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants