yfme / UIImageView-PlayGIF

UIImageView category/subclass for playing GIF. Simple, high performance, low memory footprint.
MIT License
421 stars 76 forks source link

tebleView problem #12

Open Yexinglong opened 8 years ago

Yexinglong commented 8 years ago

A plurality of different GIF, slide UICollectionView squares, you will find gif dislocation problem, I do not know how to solve

Yexinglong commented 8 years ago

gifData

Yexinglong commented 8 years ago

还是写中文吧!就是UICollectionView九宫格、使用多张不同的GIF 滑动会出现重复的GIF,效果大概是和重用机制没用好一样!都重复了

Yexinglong commented 8 years ago

cell.imageCameraView.image=nil; [cell.imageCameraView stopGIF]; if (data) { if (!cell.imageCameraView.isGIFPlaying) { cell.imageCameraView.image=image; } cell.imageCameraView.gifData =data; [cell.imageCameraView startGIF]; }else{ cell.imageCameraView.image =image; } 暂时解决了重用错位的办法~~~~

keshiim commented 7 years ago

@Yexinglong 我觉得你可以在cell的prepareForReuse中将imageView.gifData = nil 然后stopGif,设置image属性是没有用的,这个播放底层不是用imageView.image属性显示的,而是用imageView.layer.content实现的