Advertisement
undeadhip

Untitled

Aug 20th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -(void)loadFeedPosts {
  2.     self.feedController.loading = YES;
  3.     self.feedController.posts = self.feedPostDownloader.posts; //Зачем эта строчка?
  4.    
  5.     DKABlockCallback* block = [DKABlockCallback callbackWithSuccess:^(id data) {
  6.         self.feedController.loading = NO;
  7.         self.feedController.posts = self.feedPostDownloader.posts;
  8.         self.feedController.hasMore = [self.feedPostDownloader morePostsExist];
  9.     } withFail:^(NSError *error) {
  10.         self.homeController.loading = NO;
  11.         self.feedController.loading = NO;
  12.         [[[UIAlertView alloc] initWithTitle:@"Error"
  13.                                     message:error.localizedDescription
  14.                                    delegate:nil
  15.                           cancelButtonTitle:@"OK"
  16.                           otherButtonTitles:nil] show];
  17.     }];
  18.     [self.feedPostDownloader reload:24 callback:[DKAMainThreadCallback callbackWithCallback:block]];
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement