[TIMOB-3060] iOS: Modal Window Animated False
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2018-08-03T08:37:46.000+0000 |
Affected Version/s | Release 2.1.0, Release 1.8.2, Release 2.0.1, Release 3.0.0, Release 3.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | core, reprod |
Reporter | Pedro Enrique |
Assignee | Hans Knöchel |
Created | 2011-04-15T03:35:49.000+0000 |
Updated | 2018-08-03T08:37:50.000+0000 |
Description
If a modal window is opened with animated:false, it will be
opened without animation but will close with animation.
Example code:
var win = Titanium.UI.createWindow({ backgroundColor:'#fff' });
var button = Ti.UI.createButton({title:'open', width:200, height:50});
win.add(button);
button.addEventListener('click', function(){
var win2 = Ti.UI.createWindow({backgroundColor:'#ccc'});
var button2 = Ti.UI.createButton({title:'close', width:200, height:50});
win2.add(button2);
button2.addEventListener('click', function(){
win2.close();
//win2.close({animted:false});
});
win2.open({modal:true, animated:false});
});
win.open();
Jira bug review - still reproducible with latest 2.1 CI
Tested on the iOS simulator using TiSDK 2.2.0v20120830102513, issue still valid.
still valid from sdk 3.0.0ga
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Can still reproduce this with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.9.0.201705021158 Ti SDK 6.1.0.v20170519131839 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.7.0_80
The bug is not valid, because the code was not valid. Developers should use the
NavigationWindow
to open modal windows since 3.x and passanimated: false
to the close-call to disable it, since animations are natively enabled by default on iOS. Working code: