Remove a View with animation

You must Login before you can answer or comment on any questions.

I am using this code to animate the view:

var t = Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT;
            viewWin.animate({view:detailsView,transition:t});
how to remove this view with the same animation??

2 Answers

use finish Event

viewWin.animate({
 view:detailsView,
 transition:t
}, function() { 
window.remove(viewWin);
});

— answered 10 months ago by Alexander Bauer
answer permalink
3 Comments
  • I want to remove the view not the window!!!

    — commented 10 months ago by Michael Mavris

  • ... the code removes the viewWin from a window. To display a view, you had to add it to a window or do you have some magic ongoing there? ;)

    — commented 10 months ago by Alexander Bauer

  • viewWin is a window. Never mind I find the solution.I animate the mapview again. PS. If you animate a view in window appcelerator does not consider it as it's child(at least that what the console says) so you can remove() it. You can say that FLIP_FROM_LEFT is a kind of magic

    — commented 10 months ago by Michael Mavris

viewWin is a window. Never mind I find the solution.I animate the mapview again. PS. If you animate a view in window appcelerator does not consider it as it's child(at least that what the console says) so you can remove() it. You can say that FLIP_FROM_LEFT is a kind of magic

Your Answer

Think you can help? Login to answer this question!