Created
November 30, 2012 08:18
-
-
Save Gi-lo/4174484 to your computer and use it in GitHub Desktop.
iPad/iPhone specific code
This file contains hidden or 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
On_iPhone(^{ | |
// Some iPhone only code | |
}); | |
On_iPad(^{ | |
// Some iPad only code | |
}); | |
or: | |
if ([UIDevice isIPhone]) { | |
// Some iPhone only code | |
} | |
if ([UIDevice isIpad]) { | |
// Some iPad only code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The if statement is better in my opinion. It's cleaner and easier to understand for any developer.