Created
September 15, 2015 15:37
-
-
Save MaximAlien/1ff8f0699d0b4cbd5a50 to your computer and use it in GitHub Desktop.
[iOS] Code which detects what type of device is used: Phone or Tablet.
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 (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) | |
{ | |
NSLog(@"iPad"); | |
} | |
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
{ | |
NSLog(@"iPhone"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment