Skip to content
View appt.tss
//In your app/styles directory you will find an app.tss file
//If this file doesn't exist, simply add it to your project.
//The app.tss is used to apply styles across your project.
//For more on how this works, please visit http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes-section-35621526_AlloyStylesandThemes-GlobalStyles
//In your app.tss add the below Window style. This will set the orientation
//for all windows in your app
"Window" : {
orientationModes :[
Ti.UI.PORTRAIT
View NSTimeZoneIANA.playground
//: NSTimeZone and the IANA db
import UIKit
//http://www.iana.org/time-zones
let IANAtimeZones = ["GMT","Europe/Andorra","Asia/Dubai","Asia/Kabul","America/Antigua","America/Anguilla","Europe/Tirane","Asia/Yerevan","Africa/Luanda","Antarctica/McMurdo","Antarctica/Rothera","Antarctica/Palmer","Antarctica/Mawson","Antarctica/Davis","Antarctica/Casey","Antarctica/Vostok","Antarctica/DumontDUrville","Antarctica/Syowa","Antarctica/Troll","America/Argentina/Buenos_Aires","America/Argentina/Cordoba","America/Argentina/Salta","America/Argentina/Jujuy","America/Argentina/Tucuman","America/Argentina/Catamarca","America/Argentina/La_Rioja","America/Argentina/San_Juan","America/Argentina/Mendoza","America/Argentina/San_Luis","America/Argentina/Rio_Gallegos","America/Argentina/Ushuaia","Pacific/Pago_Pago","Europe/Vienna","Australia/Lord_Howe","Antarctica/Macquarie","Australia/Hobart","Australia/Currie","Australia/Melbourne","Australia/Sydney","Australia/Broken_Hill","Australia/Brisbane","Australia/Lindeman","Australia/A
View app.js
Ti.UI.setBackgroundColor('#000');
var alertSettings = require("settings-dialog");
var win = Ti.UI.createWindow({
title:'Example', backgroundColor:'#fff', layout:"vertical"
});
win.add(Ti.UI.createLabel({
text:"Example on now to prompt user to change settings",
View app.js
Ti.App.addEventListener("resume", function(){
Ti.API.info("Resume Event Fired");
});
Ti.App.addEventListener("resumed", function(){
Ti.API.info("Resumed Event Fired");
});
Ti.App.iOS.addEventListener("shortcutitemclick", function(e){
View readme.txt
https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIApplicationShortcutIcon_Class/#//apple_ref/c/tdef/UIApplicationShortcutIconType
//add ios9.1
//UIApplicationShortcutIconTypeProhibit
//UIApplicationShortcutIconTypeContact,
//UIApplicationShortcutIconTypeHome,
//UIApplicationShortcutIconTypeMarkLocation,
//UIApplicationShortcutIconTypeFavorite,
//UIApplicationShortcutIconTypeLove,
View app.js
var win = Titanium.UI.createWindow({
title:'Demo', backgroundColor:'#fff',layout:'vertical'
});
var btnSpotLightSupported = Ti.UI.createButton({
top:20, title:'Is SpotLight Supported?',
height:60, width:Ti.UI.FILL
});
win.add(btnSpotLightSupported);
View idea.js
var qxCore = {
callbackWrappers : {
wrapperCounter : 0,
generateId : function(name){
qxCore.callbackWrappers.wrapperCounter++;
return name + qxCore.callbackWrappers.wrapperCounter;
}
}
};
View TiJSObjectsExample.js
'use strict';
import View from 'view';
import Window from 'window';
// Example Usage
let win = new Window();
let view = new View({
top: 0,
View app.js
var win = Titanium.UI.createWindow({
backgroundColor:'grey'
});
Ti.Geolocation.preferredProvider = "gps";
Ti.Geolocation.purpose = "GPS demo";
Ti.Geolocation.trackSignificantLocationChange = true;
Ti.Geolocation.setAllowBackgroundLocationUpdates(true);
View app.js
var activity = Titanium.App.iOS.createUserActivity({
activityType : "com.appcelerator.handoff.example.browsing-location"
userInfo : someDictionary,
needsSave : false,
webpageUrl : "optional webpage",
title : "an example"
});
activity.addEventListener("useractivitywascontinued",function(e){
Something went wrong with that request. Please try again.