Created
October 27, 2017 09:09
-
-
Save AkdM/aad6c178f43f28230bf65de10113eab5 to your computer and use it in GitHub Desktop.
Detecting iPhone X
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
if #available(iOS 11.0, *) { | |
if (UIApplication.shared.keyWindow?.safeAreaInsets != UIEdgeInsets.zero) { | |
print("I am an iPhone X") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment