我正在使用Titanium iphone中的Table视图。 我试图为每一行添加动画样式。
也就是说,当用户点击每一行时,行高需要增加,所以我能够在行中显示隐藏的内容。 当用户再次点击时,行高度需要降低。
对于折叠视图,我的代码是
var animation = Ti.UI.createAnimation({height: 1, duration: 500}); row.animate(animation);并且对于扩展视图,
row.animate(Ti.UI.createAnimation({ height:200, duration:300 });但以上两个代码都不起作用,
如果我在不使用动画的情况下设置行高,则其工作正常。 如何为表视图行应用动画样式...可以任意一个。
I am working on Table view in Titanium iphone. I tried to add animation style for each row.
That is, when user click on each row , then row height need to increase, So I able to show hided contents in row. And when user click again then the row height need to decrease.
My code is, for collapsed view,
var animation = Ti.UI.createAnimation({height: 1, duration: 500}); row.animate(animation);and for expanded view,
row.animate(Ti.UI.createAnimation({ height:200, duration:300 });but above both code are not working,
If I set row height without using animation then its working fine. How to apply animation style for table view row... can any one please.
最满意答案
你可以试试这个
http://developer.appcelerator.com/question/119198/animating-row-height-changes
TableViewRow无法设置动画。 这是文档错误。 您需要创建自己的动画功能(即setTimeout)。
you can try this
http://developer.appcelerator.com/question/119198/animating-row-height-changes
TableViewRow cannot be animated. It's documentation bug. You need to make your own animation function (ie, setTimeout).
更多推荐
row,animation,视图,height,电脑培训,计算机培训,IT培训"/> <meta name="descr
发布评论