Skip to content

Instantly share code, notes, and snippets.

View jaraen's full-sized avatar

Javier Rayon jaraen

View GitHub Profile
@jaraen
jaraen / AppWindow.js
Created August 31, 2012 15:23
Titanium: tables and callbacks
var Mods = require('/ModulePaths');
var $$ = require(Mods.STYLES),
PhotosView = require(Mods.PHOTOS_TABLEVIEW);
module.exports = function(){
var args = args || {};
var win = Ti.UI.createWindow($$.appWindow);
@jaraen
jaraen / ModulePaths.js
Created August 12, 2012 11:24
AppTemplate for Titanium tutorial
//avoid initial slash in paths under mobileweb platform
var firstSeparator = (Ti.Platform.name === 'mobileweb') ? '' : '/';
var ui = firstSeparator + 'app/ui/';
module.exports = {
TABGROUP: ui + 'TabGroup',
WINDOW1: ui + 'Window1',
WINDOW2: ui + 'Window2',
@jaraen
jaraen / gist:1626498
Created January 17, 2012 12:31
Shadow property in TiUIView.m
-(void)setShadow_:(id)args
{
if(args != nil)
{
self.layer.masksToBounds = NO;
if ([args objectForKey:@"shadowOffset"] != nil) {
CGPoint p = [TiUtils pointValue: [args objectForKey:@"shadowOffset"]];
CGSize shadowOffset = {p.x,p.y};