I have a button on each cell and while the button is tapped I want to play different audio file from array for each cell.
I don't know how to implement an array of sounds/audio files for my table view cells.
I have a button outlet and action on my UITableViewCell
. But I am not sure how to initialise my AVaudioplayer
in tableview.m specifically in:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell22";
Below I've inserted an image of the project I want to achieve. image1