Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12327] iOS: Window close method does not play nice with animation style constants

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-04T21:40:20.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0
Fix Version/sRelease 3.1.0, 2013 Sprint 03 API, 2013 Sprint 03
ComponentsiOS
LabelsSupportTeam, module_animation, qe-testadded
ReporterEduardo Gomez
AssigneeVishal Duggal
Created2013-01-17T16:33:50.000+0000
Updated2014-06-19T12:44:28.000+0000

Description

Issue

iOS: Window close method does not play nice with [property transition](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Animation-property-transition) (using animation style constants).

Tested on

iOS 6 simulator & iPhone 4 w/ 6.0.1

Steps to reproduce

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.

Stripped down version

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(); 

Comments

  1. Vishal Duggal 2013-01-18

    PR https://github.com/appcelerator/titanium_mobile/pull/3739
  2. Sabil Rahim 2013-02-04

    Functional Testing
  3. Paras Mishra 2013-02-25

    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

JSON Source