I was wondering how a generic music image for a music file in a UITableView on iOS and so on such as a generic picture image for image files. Here is a picture of what i am trying to do http://smartlifeblog.com/wp-content/uploads/2012/02/dropbox-ios.jpg
So far i have code to display the files in my documents directory
static NSString *CellIdentifier = @"FileCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = [files objectAtIndex:indexPath.row];
return cell;
I can add an image in the table but im not sure how to load the appropriate image for the appropriate file type.