Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
Created February 11, 2019 18:33
Show Gist options
  • Save exclusiveTanim/dac67ddb7bb30b1c07dcd2a628ee6c40 to your computer and use it in GitHub Desktop.
Save exclusiveTanim/dac67ddb7bb30b1c07dcd2a628ee6c40 to your computer and use it in GitHub Desktop.
Simple code
var win2 = Titanium.UI.createWindow({
backgroundColor : 'red',
barColor : 'yellow',
titleImage : 'logo.png'
});
var win1 = Titanium.UI.iOS.createNavigationWindow({
window : win2
});
//SplitWidnow
var detail = Ti.UI.createWindow({
backgroundColor : 'white',
});
var label1 = Ti.UI.createLabel({
text : 'Detail View'
});
detail.add(label1);
var master = Ti.UI.createWindow({
backgroundColor : 'gray',
});
var label2 = Ti.UI.createLabel({
text : 'Master View'
});
master.add(label2);
var win3 = Ti.UI.iOS.createSplitWindow({
detailView : detail,
masterView : master,
backgroundColor : 'blue',
barColor : 'orange',
titleImage : 'logo.png', // This Property is not setting the Title Image in Split Window?? Please suggest how to Set the title of SplitWidnow?
});
var button = Titanium.UI.createButton({
title : 'Open Blue Window'
});
button.addEventListener('click', function() {
win1.openWindow(win3, {
animated : true
});
});
win2.add(button);
var button2 = Titanium.UI.createButton({
top: 300,
title : 'Close Blue Window'
});
button2.addEventListener('click', function() {
win1.closeWindow(win3, {
animated : true
});
//win3.close() will also work!!
});
win3.add(button2);
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment