views:

264

answers:

2

I'm trying to use the MPMediaItemCollection count property to sort the items in an array. When I try to sort an array with this NSUInteger property, and it doesn't work. When I try to print it (NSLog(@"%lx",count);) it doesn't print correctly.

How do I get the NSUInteger to work correctly?

+1  A: 

Maybe this will help. This works for me using MPMediaCollection:

[everything setGroupingType: MPMediaGroupingGenre];
NSArray *genreLists = [everything collections];

for (MPMediaItemCollection *genreList in genreLists) {
 NSLog (@"count: %d", [genreList count]);
}
mahboudz
This works. I figured out that there is a bug when the grouping type is set to album instead of genre.
spin-docta
A: 

Try using this statement: I use it and it prints out just find for me

NSLog(@"%d",count);

Pettis