Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSMutableDictionary *chapId = [[NSMutableDictionary alloc] init];
- if ([_theBook.chaptersArray count] == 1) {
- NSMutableDictionary *chapId = [[NSMutableDictionary alloc] initWithDictionary:[_theBook.chaptersArray objectAtIndex:<#(NSUInteger)#>]];
- [chapId setValue:[_theBook.chaptersArray valueForKey:@"_v"] forKey:@"_v"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"_id"] forKey:@"_id"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"book"] forKey:@"book"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"endDate"] forKey:@"endDate"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"startDate"] forKey:@"startDate"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"pages"] forKey:@"pages"];
- } else {
- chapId = [_theBook.chaptersArray objectAtIndex:indexPath.row];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"_v"] forKey:@"_v"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row]objectForKey:@"_id"] forKey:@"_id"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"book"] forKey:@"book"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"endDate"] forKey:@"endDate"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"startDate"] forKey:@"startDate"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"pages"] forKey:@"pages"];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement