[TIMOB-8491] iOS: animation - on ipad animating a view off the screen makes the view disappear when the animation starts
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-02T11:15:02.000+0000 |
Affected Version/s | Release 2.0.0, Release 1.8.2 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | n/a |
Reporter | Jon Alter |
Assignee | jithinpv |
Created | 2012-04-02T14:45:16.000+0000 |
Updated | 2017-03-17T18:43:52.000+0000 |
Description
Then a view is animated off the screen, part of it disappears when the animation starts.
This example will work on the iPad simulator
Steps to reproduce
Step 1: the the code below on the iPad simulator Step 2: click the white window (see a view slide up onto the screen) Step 3: click the green bar Step 4: see the view animate down and notice that part of the red view disappears when the animation starts Step 5: click the white view again to repeat the test
function createWindow(_params) {
var win = Ti.UI.createWindow({backgroundColor: 'transparent'});
var transpView = Ti.UI.createView({
backgroundColor: '#000',
opacity: 0.5
});
var mainView = Ti.UI.createView({
width: '80%',
backgroundColor: 'white'
});
var toolbar = Ti.UI.createView({
backgroundColor: 'green',
top: 0,
height: 44
});
var contentView = Ti.UI.createView({
top: 44,
backgroundColor: 'red'
});
win.add(transpView);
win.add(mainView);
mainView.add(toolbar);
mainView.add(contentView);
toolbar.addEventListener('click', function(){
close();
});
function open(params){
mainView.top = 800;
win.addEventListener('open', function() {
mainView.animate({
top: 80,
duration: 1000
});
});
win.open();
}
function close(params){
var closeAnim = Ti.UI.createAnimation({
top: 800,
duration: 1000
});
closeAnim.addEventListener('complete', function() {
win.close();
});
mainView.animate(closeAnim);
}
return {
open: open,
close: close,
}
}
var mainWin = Ti.UI.createWindow({
backgroundColor: 'white',
orientationModes: [Ti.UI.PORTRAIT]
});
mainWin.addEventListener('click', function(){
var win = createWindow();
win.open();
});
mainWin.open();
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPad Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced.