无法识别播放哪个音频文件

时间:2014-07-01 12:17:01

标签: ios uitableview audio chat custom-cell

我目前正在开发聊天应用程序。 我做了一个chatCellView和一个控制器。 我通过编码包含播放按钮的音频来制作视图。 现在我的问题是我无法识别正在播放哪个音频文件。需要一些指导如何实现这一目标。

感谢。

1 个答案:

答案 0 :(得分:1)

在CellforRowAtIndexPath

AudioRecieveCell * cellRecieve = reuseIdentifier = @" AudioRecieveCell&#34 ;;             cellRecieve = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];

        cellRecieve.btnPlayResOutlet.tag=indexPath.row;


        [cellRecieve.btnPlayResOutlet addTarget:self action:@selector(playResAudioPressed:) forControlEvents:UIControlEventTouchUpInside];

        return cellRecieve;

现在将选择器设为 - (无效)playResAudioPressed:(ID)发送方{

UIButton btnSender =(UIButton )发件人; 在这里写下你的逻辑

}