Created
December 17, 2011 14:59
-
-
Save valexa/1490434 to your computer and use it in GitHub Desktop.
changing [ret description] to ret does not work as expected
This file contains hidden or 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
NSMutableArray *ivarPrevious = [NSMutableArray arrayWithCapacity:1]; | |
-(void)foo | |
{ | |
NSMutableArray *newivarPrevious = [NSMutableArray arrayWithCapacity:1]; | |
for (...){ | |
NSMutableDictionary *ret = [NSMutableDictionary dictionaryWithCapacity:1]; | |
[ret setObject:foo forKey:@"foo"]; | |
[ret setObject:bar forKey:@"bar"]; | |
[newivarPrevious addObject:[ret description]]; | |
if (![ivarPrevious containsObject:[ret description]]) { | |
//new | |
} | |
} | |
[ivarPrevious removeAllObjects]; | |
[ivarPrevious setArray:newivarPrevious]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment