This file contains 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
@interface TiViewProxy(Extended) | |
@end |
This file contains 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: '#DDD' | |
}); | |
var knobRight = TiDraggable.createView({ | |
center: { x: 30, y: 105 }, | |
width: 20, height: 20, | |
minLeft: 20, | |
maxLeft: 200, |
This file contains 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(); | |
var images = []; | |
for(var i = 1; i < 100; i++){ | |
// Assuming all the images are called image1.jpg, image2.jpeg, etc... | |
images.push('/images/image'+i+'.jpg'); | |
} | |
var gallery = Gallery(images,0); |
This file contains 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
/** | |
* To be used this way | |
*/ | |
var Log = require('log'); | |
Log.Info('This is an info log'); | |
Log.Error('This is an error log'); | |
Log.Debug('This is a debug log'); |
This file contains 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 DoubleSlider = require('ti.doubleslider/widget'); | |
var win = Ti.UI.createWindow(); | |
var doubleSlider = new DoubleSlider({ | |
top: 50, | |
width: 300, | |
minValue: 0, | |
maxValue: 100, | |
startValue: 30, |
This file contains 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 Navigation = require('navigation'); | |
var rootWindow = Ti.UI.createWindow({ | |
backgroundColor: 'green' | |
}); | |
var btn = Ti.UI.createButton({ | |
title: 'next' | |
}); |
This file contains 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 UI = require('ui'); | |
UI.Window({ | |
subviews:[ | |
UI.Label({ | |
width: Ti.UI.SIZE, | |
height: Ti.UI.SIZE, | |
color: "#000", | |
text: 'here', | |
onClick: function() { |
This file contains 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 getProps(obj, indent) { | |
indent = indent || 0; | |
for(var key in obj) { | |
var str = ''; | |
for(var i = 0; i < indent; i++) str += '----'; | |
console.log(str + key + ' : ' + typeof obj[key]); | |
if(typeof obj[key] == 'object') { | |
getProps(obj[key], indent + 1) | |
} | |
} |
This file contains 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 Window1() { | |
var win = Ti.UI.createWindow({ | |
fullscreen: false, | |
backgroundColor: '#ccc' | |
}); | |
var btn = Ti.UI.createButton({ | |
title: 'open next', | |
top: 50, | |
width: Ti.UI.SIZE, |
This file contains 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 UI = require('ui'); | |
var btn = UI.Button({ | |
title: 'Hello World', | |
width: Ti.UI.SIZE, | |
height: Ti.UI.SIZE, | |
onClick: function(){ | |
alert('Button Clicked'); | |
} | |
}); |