亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

ios - 聊天界面Cell中語音消息播放動畫問題
伊謝爾倫
伊謝爾倫 2017-04-17 14:28:45
0
2
1197

在 Cell 中有一個播放語音的圖片,點擊之后用uiimage通過animationImages播放幾張圖片,但是當 Cell 滾出屏幕之外的時候,uiimage就不動了,不知是復(fù)用覆蓋了還是怎么?求大神給個解決思路啊

伊謝爾倫
伊謝爾倫

小伙看你根骨奇佳,潛力無限,來學PHP伐。

reply all(2)
大家講道理

Finally I know, this is what I did,

  • (void) playVoiceAnimation;//Play voice animation
  • (void) stopVoiceAnimation;
    The above two methods are written in the cell and are used to start and stop the picture animation. The Cell has a mark. When clicking the voice, use the block to return the Cell identifier (rowIdentifier, when creating the Cell, cell.rowIdentifier = indexPath.row;) and audio File path to Chat VC

Play the audio file after receiving it in the chat VC, and cache cell.rowIdentifier to _rowPlayVoiceAnimationIdentifier, and then traverse visibleCells. If the Cell identifier (row) is the same as the cached one, call the Cell playVoiceAnimation method
Called after audio playback ends, same as above, call Cell stopVoiceAnimation method

Handling when scrolling:
//When the cell is about to be displayed, if it is a Cell that is playing the recording file, then execute the Cell to play the recording animation
if (((ACChatTableViewCell *)cell).rowIdentifier == _rowPlayVoiceAnimationIdentifier) ??{
[((ACChatTableViewCell *)cell) startVoiceAnimation];
}

It’s a bit messy! ! !

迷茫

Is there any demo for reference?
632582467@qq.com

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template