【发布时间】:2016-10-23 09:39:33
【问题描述】:
我想在点击相应按钮时为视图设置动画,不幸的是当从上到下的动画闪烁时:
/*
* ANIMATE FROM BOTTOM TO TOP
*/
function showModal(item){
var bottom_to_top = Ti.UI.createAnimation({
top : '0%',
duration : 500
});
$[item].animate(bottom_to_top)
}
/*
* ANIMATE FROM TOP TO BOTTOM
*/
function hideModal(item){
var top_to_bottom = Ti.UI.createAnimation({
top : '100%',
duration : 500
});
$[item].animate(top_to_bottom)
}
///// HERE I SHOW HIDE MY VIEW
function button_show(){
showModal($.myView);
}
function button_hide(){
hideModal($.myView);
}
第一个问题,如果我指定“100%”隐藏视图,当我尝试显示时它不会出现,只有值 99 及以下有效。 第二个问题,隐藏视图时动画闪烁。
有人能告诉我应该怎么做吗?谢谢。
【问题讨论】:
标签: titanium appcelerator appcelerator-titanium titanium-alloy