Created
February 20, 2013 17:36
-
-
Save fahim/4997373 to your computer and use it in GitHub Desktop.
new obj-c syntax fail (or maybe im just using it wrong)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDictionary *songDict = @{@"artists": [item valueForProperty: MPMediaItemPropertyArtist], | |
@"title": [item valueForProperty: MPMediaItemPropertyTitle]}; | |
// ----------- vs ---------- // | |
// the new syntax above caused a memory error. i ended up just using the old syntax below and the code worked fine | |
// ----------- vs ---------- // | |
NSDictionary *songDict = [[NSDictionary alloc] initWithObjectsAndKeys: | |
[item valueForProperty: MPMediaItemPropertyTitle], @"title", | |
[item valueForProperty: MPMediaItemPropertyArtist], @"artists", | |
nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment