Skip to content

Instantly share code, notes, and snippets.

View patrickseda's full-sized avatar

Patrick Seda patrickseda

  • Software & Mobile Director
  • Atlanta, GA
View GitHub Profile
@aaronksaunders
aaronksaunders / app.js
Created May 20, 2012 21:28
Appcelerator Titanium Yelp API v2.0 Integration
//
// 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");
@pec1985
pec1985 / app.js
Created May 17, 2012 23:45
Easy SplitView controller - iPad, Titanium
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 )
@mauropm
mauropm / app.js
Last active October 4, 2015 14:48
Recursive clean of memory
/*
* An example of how to clean a window
* Mauro Parra-Miranda
* mauropm@gmail.com
*/
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({
@jonalter
jonalter / app.js
Created January 16, 2012 18:32
Resize image in imageView
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;
@jonalter
jonalter / app.js
Created December 6, 2011 21:38
Remove all children function
// 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);
}
@dawsontoth
dawsontoth / app.js
Created March 4, 2011 00:44
Customize the look of the tab bar in iOS Appcelerator Titanium
Ti.include('overrideTabs.js');
/*
This is a typical new project -- a tab group with three tabs.
*/
var tabGroup = Ti.UI.createTabGroup();
/*
Tab 1.