Abs3akt Abs3akt - 6 months ago 32
Objective-C Question

how to assign an array element in a indexPath from selected cells

I have an array with sound list

NSArray *nameSound = @[@"alarm-1.wav",@"alarm-2.mp3",@"alarm-3.mp3",@"alarm-4.mp3",@"alarm-5.mp3"];

And I have TableView with 5 cells,

image with sundList from xcode

How award for indexPath from TableView to element from nameSound

P.S. Sorry for my English

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

       NSString *selectedVal = [nameSound objectAtIndex:indexPath.row];
       // You can use this selectedVal