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(); | |
function shakeAnimation(view) { | |
view.transform = Ti.UI.create2DMatrix().rotate(1); | |
var r1 = Ti.UI.create2DMatrix().rotate(2); | |
var r2 = Ti.UI.create2DMatrix().rotate(-2); | |
var anim1 = Ti.UI.createAnimation({ | |
duration:200, | |
transform:r1, |
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(); | |
function shakeAnimation(view, count, distance) { | |
var anim1 = Ti.UI.createAnimation({ | |
duration:100, | |
left:view.left-distance, | |
autoreverse:true, | |
curve:Ti.UI.iOS.ANIMATION_CURVE_LINEAR, | |
repeat:count |
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(); | |
function shakeAnimation(view, count, distance) { | |
var anim1 = Ti.UI.createAnimation({ | |
duration:50, | |
left:view.left-distance, | |
autoreverse:true, | |
curve:Ti.UI.iOS.ANIMATION_CURVE_LINEAR | |
}); |
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(); | |
function shakeAnimation(view, count, distance, speed) { | |
var anim1 = Ti.UI.createAnimation({ | |
duration:speed/2, | |
left:view.left-(distance/2), | |
curve: Ti.UI.iOS.ANIMATION_CURVE_EASE_IN | |
}); | |
var anim2 = Ti.UI.createAnimation({ |
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 webview = Ti.UI.createWebView({ | |
html:'<html><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><img src="http://b.vimeocdn.com/ps/929/929705_300.jpg"></html>' | |
}); | |
win.add(webview); | |
// var image =Ti.UI.createImageView({ | |
// image:'http://b.vimeocdn.com/ps/929/929705_300.jpg', | |
// width:'100%', |
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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
var win1 = Ti.UI.createWindow({ | |
backgroundColor: 'white' |
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:'#000'}); | |
var dialog = Titanium.UI.createOptionDialog({ | |
options: ['Camera','Gallery', 'Cancel'], | |
cancel:2 | |
}); | |
dialog.show(); |
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 mainView = Ti.UI.createView(); | |
var parent1 = Ti.UI.createView({top:0, bottom:0, backgroundColor:'blue'}); | |
var parent1Child1 = Ti.UI.createView({top:50, bottom:0, backgroundColor:'green'}); | |
parent1.add(parent1Child1); |
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: '#333' | |
}); | |
var menu = Ti.UI.createView({ | |
backgroundColor:'blue', | |
top:Ti.Platform.displayCaps.platformHeight-50, | |
bottom: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
var win = Ti.UI.createWindow(); | |
win.open(); | |
function label(args){ | |
var view = Ti.UI.createView({ | |
width:'size', | |
height:'size', | |
layout:'vertical' | |
}); |