I have this code from the iPod Library Access Programming Guide: Using the iPod Library:
Listing 4-1 Creating and using a generic media query
MPMediaQuery *everything = [[MPMediaQuery alloc] init];
NSLog(@"Logging items from a generic query...");
NSArray *itemsFromGenericQuery = [everything items];
for (MPMediaItem *song in itemsFromGenericQuery) {
NSString *songTitle = [song valueForProperty: MPMediaItemPropertyTitle];
NSLog (@"%@", songTitle);
}
I am unclear about the line starting with "NSArray". "items" is not a declared identifier in the code. What is "items"? How do I translate that to Swift from Objective-C?