Question

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?

Was it helpful?

Solution

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]);
}

OTHER TIPS

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

NSLog(@"%d",count);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top