Advertisement
sashakid

GetUsers

Apr 18th, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BFCApiManager *apiManager = [BFCApiManager sharedInstance];
  2.     __weak __typeof(self) weakSelf = self;
  3.     [apiManager getListOfUsersWithParameters:nil
  4.                                      success:^(AFHTTPRequestOperation *operation, id JSON) {
  5.                                          
  6.                                          users = [[NSMutableArray alloc] init];
  7.                                          for (int i = 0; i < [apiManager.users count]; i++) {
  8.                                              BFCUser *user = [[BFCUser alloc] initWithInfo:[apiManager.users objectAtIndex:i]];
  9.                                              [users addObject:user];
  10.                                          }
  11.                                          
  12.                                          [weakSelf.usersTableView reloadData];
  13.                                      }
  14.                                      failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  15.                                      }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement