Created
April 24, 2022 11:15
-
-
Save eiskalteschatten/16e012ee6c5616f06c001742e5a4a8ec to your computer and use it in GitHub Desktop.
This is a simple if-else statement to determine whether an iOS device is an iPad or iPhone
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 UIDevice.current.userInterfaceIdiom == .pad { | |
// iPad | |
} | |
else { | |
// iPhone | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment