Last active
August 29, 2015 14:07
-
-
Save hisamekms/20a46165181496ae7fb6 to your computer and use it in GitHub Desktop.
TitaniumでiPhone 6を判定する ref: http://qiita.com/hisamekms/items/41eb6689c7423dce9e01
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
var platformHeight = Ti.Platform.displayCaps.platformHeight; | |
Alloy.Globals.isIPhone6Plus = platformHeight === 736; | |
Alloy.Globals.isIPhone6 = platformHeight === 667; | |
Alloy.Globals.isIPhone5 = platformHeight <= 568; |
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
var platformHeight = Ti.Platform.displayCaps.platformHeight | |
Alloy.Globals.isIPhone6Plus = platformHeight === 736 | |
Alloy.Globals.isIPhone6 = platformHeight === 667 | |
Alloy.Globals.isIPhone5 = platformHeight <= 568 |
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
"Label[if=Alloy.Globals.isIPhone6Plus]": { | |
text: "iPhone 6 Plus" | |
} | |
"Label[if=Alloy.Globals.isIPhone6]": { | |
text: "iPhone 6" | |
} | |
"Label[if=Alloy.Globals.isIPhone5]": { | |
text: "iPhone 5 or earlier" | |
} |
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
"Label[if=Alloy.Globals.isIPhone6Plus]": { | |
text: "iPhone 6 Plus" | |
} | |
"Label[if=Alloy.Globals.isIPhone6]": { | |
text: "iPhone 6" | |
} | |
"Label[if=Alloy.Globals.isIPhone5]": { | |
text: "iPhone 5 or earlier" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment