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
Ti.include('overrideTabs.js'); | |
/* | |
This is a typical new project -- a tab group with three tabs. | |
*/ | |
var tabGroup = Ti.UI.createTabGroup(); | |
/* | |
Tab 1. |
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
// Remove all children from a view | |
// Pedro :) | |
function removeChildren(el){ | |
var children = el.children; | |
while(el.children.length){ | |
var child = children[el.children.length-1]; | |
removeChildren(child); | |
el.remove(child); | |
} |
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 squareImage(imageView){ | |
function getThumb(){ | |
imageView.removeEventListener('load',getThumb); | |
var blob = imageView.toBlob(); | |
var height = blob.height; | |
var width = blob.width; | |
if(height < width){ | |
var size = height; |
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
/* | |
* An example of how to clean a window | |
* Mauro Parra-Miranda | |
* [email protected] | |
*/ | |
var win = Ti.UI.createWindow(); | |
var view = Ti.UI.createView(); | |
var label = Ti.UI.createLabel(); | |
var label2 = Ti.UI.createLabel(); | |
var image = Ti.UI.createImageView({ |
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
// | |
// Aaron K. Saunders | |
// | |
// http://www.clearlyinnovative.com | |
// http://blog.clearlyinnovative.com | |
// @aaronksaunders | |
// | |
// SEE http://bytespider.github.com/jsOAuth/ for jsOAuth.js | |
// | |
Ti.include("jsOAuth.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
// | |
// Aaron K. Saunders | |
// | |
// http://www.clearlyinnovative.com | |
// http://blog.clearlyinnovative.com | |
// @aaronksaunders | |
// | |
// | |
(function() { | |
var group, tab1, tab2, win1, win2; |
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(); | |
win.open(); | |
function label(args){ | |
var view = Ti.UI.createView({ | |
width:'size', | |
height:'size', | |
layout:'vertical' | |
}); |
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
/** | |
* Dependencies | |
*/ | |
var ACS = require('ti.cloud'); | |
/** | |
* CloudImage Definition | |
*/ | |
var CloudImage = function(_args) { |
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
DialogWindow = function(message, type){ | |
// Default params | |
var message = message || "How about you add some message to this? :)"; | |
var type = type || "error"; | |
var window = Titanium.UI.createWindow({ | |
width: 320, | |
height: 44, | |
top: 44, |
OlderNewer