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
@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.
@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);
}
@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;
@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({
@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 )
@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");
@aaronksaunders
aaronksaunders / app.js
Created May 22, 2012 00:29
Using Swipes to open and close windows in a navigation group with titanium appcelerator
//
// Aaron K. Saunders
//
// http://www.clearlyinnovative.com
// http://blog.clearlyinnovative.com
// @aaronksaunders
//
//
(function() {
var group, tab1, tab2, win1, win2;
@alanleard
alanleard / app.js
Created July 18, 2012 21:21
Underline function
var win = Ti.UI.createWindow();
win.open();
function label(args){
var view = Ti.UI.createView({
width:'size',
height:'size',
layout:'vertical'
});
@grantges
grantges / CloudImage.js
Created August 31, 2012 10:22
Class for handling remote Images in Titanium from the Appcelerator Cloud Service.
/**
* Dependencies
*/
var ACS = require('ti.cloud');
/**
* CloudImage Definition
*/
var CloudImage = function(_args) {
@raulriera
raulriera / DialogWindow.js
Created September 9, 2012 11:08
CustomAlertDialog commonJS module for Titanium Appcelerator. Similar to the "Tweetbot" (but will need more makeup of course) where the information is displayed below the title bar instead of an intrusive popup
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,