
[UIVIEw TransitionWithVIEw:myCell.myImageVIEw duration:2.0 options:UIVIEwAnimationoptionTransitionCrossdissolve animations:^{ myCell.myImageVIEw.image = myImage;} completion:NulL]; 但是,当单元格被重用时,我需要删除此图像.
重复使用时,会显示最后的图像(在重复使用之前显示),然后转换为其应该是的图像,而不是从无图像转换为应该是的图像.
我试过了
-(voID)prepareForReuse { [super prepareForReuse];// More is obvIoUsly needed than just setting image to nil when using a Transitionself.myImageVIEw.image = nil;[self.myImageVIEw setNeedsdisplay];// but I also trIEd removing all animations[self.myImageVIEw.layer removeAllAnimations];// and I even trIEd removing the sublayers,but still no success.[self.myImageVIEw.layer.sublayers makeObjectsPerformSelector:@selector(removeFromSuperlayer)];} 任何帮助不胜感激,但如果您不明白问题,请不要回答.评论,所以如果需要,我可以更好地解释.
谢谢!
解决方法 你可以利用回调的tableVIEw:dIDEnddisplayingCell:forRowAtIndexPath:
这被称为就像细胞在可见区域之外.尝试将图像设置为零或无图像.应该工作
总结以上是内存溢出为你收集整理的ios – 如何清除UIView transitionWithView的效果全部内容,希望文章能够帮你解决ios – 如何清除UIView transitionWithView的效果所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)