I am trying to perform a simple flip left to right animation in iOS but every time i try to do it i get a crash, given below is the code that i am using can you please help me out to figure out what can be the issue here,
However the first time when i animate it everything is fine but when i click on the detailsView i get a crash can please help me out on this...
MainFunctions.displayProfileInfo = function(e){ var detailsView = Titanium.UI.createImageView({ image : detailsView Background, opacity:1, zIndex: 10 }); var profileView = Titanium.UI.createImageView({ image : profileViewImage, opacity: 0.1, zIndex: 20 }); var blackView = Ti.UI.createView({ backgroundColor: 'black', touchEnabled: false, zIndex: 15 }); MainWindow.add(profileView); MainWindow.add(detailsView); MainWindow.add(blackView); profileView.addEventListener("click", function(e) { blackView.zIndex = 5; profileView.animate({ view : detailsView, transition : Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT, duration : 2500 }); }); detailsView.addEventListener("click", function(e) { if(e.source == detailsView) { var displayProfileViewAnimation = Titanium.UI.createAnimation(); displayProfileViewAnimation.view= profileView; displayProfileViewAnimation.transition= Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT; displayProfileViewAnimation.duration=2500; detailsView.animate(displayProfileViewAnimation); // getting a crash here } }); UtilFunctions.hold(50); var detailsViewAnimation = Titanium.UI.createAnimation(); detailsViewAnimation.view=profileView; detailsViewAnimation.transition= Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT; detailsViewAnimation.duration=2500; profileView.animate({opacity:1,duration:2000,}); UtilFunctions.hold(1500); profileView.animate(detailsViewAnimation); };