From 5de1c0268b17d2ac7dad2c91c1f58c2fa0a99563 Mon Sep 17 00:00:00 2001 From: Luda Fux Date: Tue, 15 Jan 2019 10:39:51 +0200 Subject: [PATCH] Add sound id to each cell --- SystemSoundLibrary/SoundListViewController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SystemSoundLibrary/SoundListViewController.m b/SystemSoundLibrary/SoundListViewController.m index 98ef6af..d66beb1 100644 --- a/SystemSoundLibrary/SoundListViewController.m +++ b/SystemSoundLibrary/SoundListViewController.m @@ -82,7 +82,11 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; - cell.textLabel.text = [[audioFileList objectAtIndex:indexPath.row] lastPathComponent]; + SystemSoundID soundID; + AudioServicesCreateSystemSoundID((__bridge_retained CFURLRef)[audioFileList objectAtIndex:indexPath.row],&soundID); + + + cell.textLabel.text = [NSString stringWithFormat:@"%d: %@",soundID, [[audioFileList objectAtIndex:indexPath.row] lastPathComponent]]; return cell; }