Skip to content

Instantly share code, notes, and snippets.

@eiskalteschatten
Created April 24, 2022 11:15
Show Gist options
  • Save eiskalteschatten/16e012ee6c5616f06c001742e5a4a8ec to your computer and use it in GitHub Desktop.
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
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