Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js
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
var url = "http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=217110902183005084784.00049d962454fabcabdc2&output=kml"; | |
//Add routes from a remote KML file to one map | |
goog.maps.kml.addRoutesToMap(mySingleMap, url); | |
//Multiple Maps | |
goog.maps.kml.addRoutesToMap([myGoogleMap1, myGoogleMap2], url); |
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
var win = Ti.UI.createWindow({ | |
backgroundColor:'#ccc' | |
}); | |
// create the table view | |
var tableView = Ti.UI.createTableView({}); | |
// create an empty array | |
var data = []; | |
// this is the alert message + deleting the row from the array | |
function confirmDel(rowId,rowName) { |
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
var SplitView = require('splitview'); | |
/** | |
* SplitView Public Methods: | |
* | |
* split.initWithMasterAndDetailWindows( Ti.UI.Window, Ti.UI.Window ); | |
* split.openInMaster( Ti.UI.Window ) | |
* split.openInDetail( Ti.UI.Window ) |
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
function showItems(e) { | |
Ti.API.info(e.rowData.itemName); | |
} | |
var rowData=[]; | |
for(var i=1;i<=10;i++){ | |
var payload={ | |
rowId:i, | |
itemName:'Test' + i | |
} |
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
// add all items to collection | |
Alloy.Collections.Fugitive.reset([{ | |
"name" : "Jeff Haynie" | |
}, { | |
"name" : "Nolan Wright" | |
}, { | |
"name" : "Don Thorp" | |
}, { | |
"name" : "Marshall Culpepper" | |
}, { |
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
/* | |
* ActionBar Helper Class for Appcelerator Titanium | |
* Author: Ricardo Alcocer | |
* | |
* Licensed under the MIT License (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://alco.mit-license.org/ | |
* |
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 'rubygems' | |
require 'twitter' | |
# see https://github.com/sferik/twitter | |
def twitter_client | |
Twitter::REST::Client.new do |config| | |
config.consumer_key = "XXXXXX" | |
config.consumer_secret = "XXXXXX" | |
config.access_token = "XXXXXX" |
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
// | |
// RN3DTouchGestureRecognizer.swift | |
// | |
// Created by Ryan Nystrom on 10/10/15. | |
// Copyright © 2015 Ryan Nystrom. All rights reserved. | |
// | |
import UIKit.UIGestureRecognizerSubclass | |
class RN3DTouchGestureRecognizer: UIGestureRecognizer { |