Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.30 KB | None | 0 0
  1. LPUserCategory* userCategory = self.userCategory;
  2.    
  3.     for (NSString* categoryID in self.userCategory.categories) {
  4.        
  5.         userCategory.categories = [NSMutableArray arrayWithObject:categoryID];
  6.        
  7.         __weak LPMyJournalVC * weakSelf = self;
  8.        
  9.         [self.view makeToastActivity];
  10.        
  11.         [[LPDataManager sharedManager] requestDiaryContent:userCategory withBlockSuccess:^{
  12.            
  13.             dispatch_async(dispatch_get_main_queue(), ^{
  14.                
  15.                 LPContent * diaryContent = [[LPDataManager sharedManager] getDiaryContent];
  16.                
  17.                 weakSelf.articles = [diaryContent getSortedItems];
  18.  
  19. //                [self.dictionaryWithArticles setObject:articles forKey:category.label];
  20. //                [weakSelf reloadContentArticles];
  21.                
  22.                 [weakSelf.view hideToastActivity];
  23.             });
  24.            
  25.         } withBlockFailure:^(NSError *error) {
  26.            
  27.             dispatch_async(dispatch_get_main_queue(), ^{
  28.                
  29.                 [weakSelf.view hideToastActivity];
  30.                
  31. //                weakSelf.articles = nil;
  32. //                [weakSelf reloadContentArticles];
  33.             });
  34.         }];
  35.        
  36.     }
  37.    
  38.     NSLog(@"%@", self.articles);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement