-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor computing safeAreaInsets in Shout- and WhistleFactory
This commit refactors the iPhone X fix (#179) to reduce the amount of `#available(iOS 11.0, *)` annotations.
- Loading branch information
Showing
6 changed files
with
38 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
PODS: | ||
- Whisper (4.0.0) | ||
- Whisper (5.0.0) | ||
|
||
DEPENDENCIES: | ||
- Whisper (from `../../`) | ||
|
||
EXTERNAL SOURCES: | ||
Whisper: | ||
:path: "../../" | ||
:path: ../../ | ||
|
||
SPEC CHECKSUMS: | ||
Whisper: 08be92623311f8e53201e62e17f6d7b9599a4714 | ||
Whisper: 39b833d0f279912a7f38a19c4ba603435514a550 | ||
|
||
PODFILE CHECKSUM: e20a3f258a5cd7e57b37f62aadb18fd14d135133 | ||
|
||
COCOAPODS: 1.2.0 | ||
COCOAPODS: 1.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import UIKit | ||
|
||
extension UIView { | ||
var safeYCoordinate: CGFloat { | ||
let y: CGFloat | ||
if #available(iOS 11.0, *) { | ||
y = safeAreaInsets.top | ||
} else { | ||
y = 0 | ||
} | ||
|
||
return y | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters