Advertisement
Guest User

Untitled

a guest
Mar 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSMutableDictionary *chapId = [[NSMutableDictionary alloc] init];
  2.                                  
  3.                                  if ([_theBook.chaptersArray count] == 1) {
  4.                                      NSMutableDictionary *chapId = [[NSMutableDictionary alloc] initWithDictionary:[_theBook.chaptersArray objectAtIndex:<#(NSUInteger)#>]];
  5.  
  6.                                      [chapId setValue:[_theBook.chaptersArray valueForKey:@"_v"] forKey:@"_v"];
  7.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"_id"] forKey:@"_id"];
  8.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"book"] forKey:@"book"];
  9.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"endDate"] forKey:@"endDate"];
  10.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"startDate"] forKey:@"startDate"];
  11.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"pages"] forKey:@"pages"];
  12.  
  13.  
  14.                                  } else {
  15.                                      chapId = [_theBook.chaptersArray objectAtIndex:indexPath.row];
  16.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"_v"] forKey:@"_v"];
  17.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row]objectForKey:@"_id"] forKey:@"_id"];
  18.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"book"] forKey:@"book"];
  19.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"endDate"] forKey:@"endDate"];
  20.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"startDate"] forKey:@"startDate"];
  21.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"pages"] forKey:@"pages"];
  22.                                  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement