Samples and examples
nuno opened this issue · 3 comments
nuno commented
Hello, thanks for this project, you have any demo app with some sample code examples by chance?
yozef commented
Here's an example:
//load component dependencies
var POP = require("guy.mcdooooo.tipop");
//create component instance
var self = Ti.UI.createWindow({
backgroundColor:'#ffffff'
});
//construct UI
var firstView = Ti.UI.createView({
width: 200, height:100, backgroundColor:'red', bottom: 30, left: 20
});
firstView.addEventListener('click', function() {
// the magic
POP.basic(firstView, {
top:100,
left:500,
opacity: 0.7,
backgroundColor: '#AABBE0', // to blue
borderRadius:30,
easing: 'easeOut',
});
});
self.add(firstView);
self.open();
McDo commented
Hi @nuno :
The usage is exactly the sample code @yozef showed, try different animations (basic, spring and decay) with their properties (easing, springBounciness or delay etc.) as the Function List described.