You need to implement your didSelectRowAtIndexPath
like the following code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
MPMediaItemCollection *songs = [self.arrayOfSongs objectAtIndex:indexPath.row];
MPMediaItem *item = [songs representativeItem];
self.player = [[[AVAudioPlayer alloc] initWithContentsOfURL:[item valueForProperty:MPMediaItemPropertyAssetURL] error: nil]
autorelease];
}