Skip to content

Instantly share code, notes, and snippets.

@jimmybaker
Created June 13, 2010 08:20
Show Gist options
  • Select an option

  • Save jimmybaker/436460 to your computer and use it in GitHub Desktop.

Select an option

Save jimmybaker/436460 to your computer and use it in GitHub Desktop.
var token = Titanium.App.Properties.getString('token');
if(token == null) {
// show sign up screen
var win = Titanium.UI.createWindow({
url: 'main_windows/auth/choose.js',
backgroundColor: '#fff'
});
win.open({
delay: 1000,
transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT
});
} else {
// show menu
}
var win = Titanium.UI.currentWindow;
var buttonView = Titanium.UI.createView({
backgroundColor: '#fff'
});
var signInButton = Titanium.UI.createButton({
color: '#000',
title: 'Sign in',
color:'#000',
top:110,
width:301,
height:57,
font:{fontSize:20,fontWeight:'bold',fontFamily:'Helvetica Neue'}
});
var signUpButton = Titanium.UI.createButton({
color: '#000',
title: 'Sign up',
top:210,
width:301,
height:57,
font:{fontSize:20,fontWeight:'bold',fontFamily:'Helvetica Neue'}
});
buttonView.add(signInButton);
buttonView.add(signUpButton);
win.add(buttonView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment