Skip to content

Instantly share code, notes, and snippets.

@theeluwin
Created August 24, 2013 12:41
Show Gist options
  • Select an option

  • Save theeluwin/6327905 to your computer and use it in GitHub Desktop.

Select an option

Save theeluwin/6327905 to your computer and use it in GitHub Desktop.
if([[[items1 valueForKey:@"paging"] valueForKey:@"limit"] intValue]==2)
{
[copyOfDirt setObject:[[items1 valueForKey:@"data"] valueForKey:@"id"][0] forKey:@"id"];
[copyOfDirt setObject:[[items1 valueForKey:@"data"] valueForKey:@"id"][1] forKey:@"id2"];
[copyOfDirt setObject:[[items1 valueForKey:@"paging"] valueForKey:@"limit"] forKey:@"count"];
[copyOfDirt writeToFile:plistPath atomically:YES];
}else{
[copyOfDirt setObject:[[items1 valueForKey:@"data"] valueForKey:@"id"][0] forKey:@"id"];
[copyOfDirt setObject:[[items1 valueForKey:@"paging"] valueForKey:@"limit"] forKey:@"count"];
[copyOfDirt writeToFile:plistPath atomically:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment