Last active
December 13, 2015 23:48
-
-
Save tuki0918/4993899 to your computer and use it in GitHub Desktop.
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
// require | |
var MyApp = { | |
name: require('') | |
}; | |
var $ = MyApp; | |
var platform = Ti.Platform.name; | |
// Android: true or false | |
Ti.App.isAndroid = false; | |
if (platform === 'android') { | |
Ti.App.isAndroid = true; | |
} | |
// iOS: true or false | |
Ti.App.isiOS = false; | |
if (platform === 'iPhone OS') { | |
Ti.App.isiOS = true; | |
} | |
// Default Background Color | |
Ti.UI.setBackgroundColor('#fff'); | |
// Only iOS: StatusBar Color | |
if (Ti.App.isiOS) { | |
Ti.UI.iPhone.setStatusBarStyle(Ti.UI.iPhone.StatusBar.OPAQUE_BLACK); | |
} | |
// Set Properties | |
Ti.App.Properties.setString('String','I am a String Value '); | |
Ti.App.Properties.setInt('Int',10); | |
Ti.App.Properties.setBool('Bool',true); | |
Ti.App.Properties.setDouble('Double',10.6); | |
Ti.App.Properties.setList('MyList',array); | |
// Get Properties | |
Ti.App.Properties.getString('String'); | |
Ti.App.Properties.getInt('Int'); | |
Ti.App.Properties.getBool('Bool'); | |
Ti.App.Properties.getDouble('Double'); | |
Ti.App.Properties.getList('MyList'); | |
// プロパティの存在確認をします | |
var bool = Ti.App.Properties.hasProperty('prop_name'); | |
// プロパティ名の配列を返します。 | |
var list = Ti.App.Properties.listProperties() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment