防止 UITableviewcell 在重新排序期间变得透明 [英] Prevent UITableviewcell from becoming transparent during reordering

查看:23
本文介绍了防止 UITableviewcell 在重新排序期间变得透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在重新排序动画期间保持我的 uitableviewcells 不透明 - 原因是我正在一个视图中自定义绘制单元格以提高滚动性能,但这样做会显着减慢重新排序动画的速度.

I am trying to keep my uitableviewcells opaque during reorder animation - reason being that I am doing custom drawing of the cell in one view to enhance scroll performance, but doing this slows down the reorder animation significantly.

知道如何实现这一目标吗?

Any idea how to achieve this?

推荐答案

问这个问题我觉得很傻XD

I feel dumb for asking this question XD

我刚刚发现在我的 drawrect 函数中,我可以覆盖 alpha 值.因此,在绘制开始时,我只是设置了 self.alpha = 1.0f,瞧,我的单元格在所有模式下都是不透明的,包括在重新排序的过程中.

I just figured out that in my drawrect function, I can override alpha value. so, in the beginning of the draw, I just set self.alpha = 1.0f, and voila my cells are opaque in all modes, including in middle of reordering.

这篇关于防止 UITableviewcell 在重新排序期间变得透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆