i tried to read the apple doc but ended up into many errors:
heres what i did
Following is what i have done so far:
MPMediaQuery *media_artsist = [[MPMediaQuery alloc] init];
[media_artsist setGroupingType: MPMediaGroupingArtist];
collections = [media_artsist collections];
So when i log
NSLog(@"-------- %@",collections);
i get:
(
"<MPConcreteMediaItemCollection: 0x2de330>",
"<MPConcreteMediaItemCollection: 0x2de5b0>",
"<MPConcreteMediaItemCollection: 0x2de1a0>",
"<MPConcreteMediaItemCollection: 0x2de750>"
)
But when i try to
display it on tableview i get a error:
- (UITableViewCell *)tableView

UITableView *)tableView cellForRowAtIndexPath

NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectMake(0,0,0,0) reuseIdentifier:MyIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryCheckmark;
cell.textLabel.text =[collections objectAtIndex:indexPath.row]; //objectForKey:@"title"]; //
}
return cell;
}
error is:
2011-07-07 10:38:50.242 FSDSClient[1033:707] -[MPConcreteMediaItemCollection isEqualToString:]: unrecognized selector sent to instance 0x2e2c30
2011-07-07 10:38:50.294 FSDSClient[1033:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MPConcreteMediaItemCollection isEqualToString:]: unrecognized selector sent to instance 0x2e2c30'
terminate called after throwing an instance of 'NSException'