Last active
January 2, 2016 22:09
-
-
Save csemrm/3bb6621e4ce462d5b4ef to your computer and use it in GitHub Desktop.
View Animation using Titanium appcelerator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hi, I have tested this issue in Ti SDK 3.3.0.RC. Its working good. | |
Testing Environment: | |
Titanium SDK: 3.3.0.RC, 3.2.3.GA | |
Titanium CLI: 3.2.3 | |
IOS Simulator 7.1 | |
Appcelerator Studio, build: 3.3.0.201406271159 | |
Step to Reproduce | |
Create a sample Ti Classic project from AppC Studio | |
Update app.js file with test code | |
Run on IOS device/simulator | |
Click on "animate" button | |
Animation will start | |
*/ | |
var win = Ti.UI.createWindow({ | |
backgroundColor : 'white' | |
}); | |
var animate = Ti.UI.createButton({ | |
title : 'animate', | |
top : 10, | |
}); | |
win.add(animate); | |
view = Ti.UI.createView({ | |
backgroundColor : 'red', | |
width : 200, | |
height : 200, | |
top : 100, | |
left : 100, | |
}); | |
win.add(view); | |
animate.addEventListener('click', function(e) { | |
view.animate({ | |
top : 200, | |
right : 300, | |
duration : 500 | |
}, function() { | |
view.animate({ | |
top : 100, | |
left : 10, | |
duration : 500 | |
}); | |
}); | |
}); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment