ti-os
Platform conditional utility for cross-platform Titanium apps
Install
In the Resources
directory:
$ npm install --save ti-os
Usage
var os = ; // use the properties for if statementsif osiphone console; // and the method for inline conditionalsvar win = TiUI;
API
os(platform)
platform
Required
Type: object
Keys: iphone5
, iphone
, ipad
, ios
, android
, default
default
will be used if none of the platforms match.
Values can be a string
or function
. If it's a function
it will be called.
os.iphone5
os.iphone
os.ipad
os.ios
os.android
License
MIT © Sindre Sorhus