!/api/Titanium.UI.Animation-property-transition) (using animation style constants).
1. Run sample
2. Press "Click me to open"
3. Press "Click me to close"
4. First UI item flickers
5. Repeat steps 2 and 3. Both UI items flickers now.
var win1 = Titanium.UI.createWindow({
title : 'Window 1',
backgroundColor : 'red',
layout : 'vertical',
modal : false
});
var label1 = Titanium.UI.createLabel({
top : 25,
color : '#000',
text : 'Click me to open',
font : {
fontSize : 20,
fontFamily : 'Helvetica Neue'
},
textAlign : 'center',
width : 'auto',
height : 25
});
win1.add(label1);
var view1 = Titanium.UI.createView({
top : 25,
backgroundColor : 'green',
width : 'auto',
height : Ti.UI.SIZE
});
win1.add(view1);
var view2 = Titanium.UI.createView({
top : 25,
backgroundColor : 'blue',
width : 'auto',
height : Ti.UI.SIZE
});
view2.add(Titanium.UI.createLabel({
top : 25,
color : '#000',
text : 'Im other Label in a View',
font : {
fontSize : 20,
fontFamily : 'Helvetica Neue'
},
textAlign : 'center',
width : 'auto'
}));
win1.add(view2);
var win2 = Titanium.UI.createWindow({
title : 'Window 1',
backgroundColor : '#000',
modal : false
});
var label2 = Titanium.UI.createLabel({
color : '#fff',
text : 'Click me to close',
font : {
fontSize : 20,
fontFamily : 'Helvetica Neue'
},
textAlign : 'center',
width : 'auto',
});
win2.add(label2);
label1.addEventListener('click', function(e) {
win2.open({
transition : Titanium.UI.iPhone.AnimationStyle.CURL_UP
});
});
label2.addEventListener('click', function(e) {
win2.close({
transition : Titanium.UI.iPhone.AnimationStyle.CURL_DOWN
// transition : Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT
});
});
win1.open();
PR https://github.com/appcelerator/titanium_mobile/pull/3739
Functional Testing
Window is getting closed fine with animation. Verified on : Device : ipad3 , iOS : 6 SDK version: 3.1.0.v20130223030327 CLI version : 3.0.24 OS : MAC OSX 10.7.5 XCode : 4.5.1