Guest User

Untitled

a guest
Nov 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. - (void)parserDidEndDocument:(NSXMLParser *)parser {
  2. [Hud hideAnimated:true];
  3. [self.myTbl reloadData];
  4. dispatch_async(dispatch_get_main_queue(),^{
  5. [self loadTutorials];
  6. });
  7. }
  8.  
  9. #pragma mark:GetAllData
  10. -(void)loadTutorials{
  11. dispatch_async(dispatch_get_main_queue(),^{
  12.  
  13.  
  14. int k = 0;
  15.  
  16. for (NSMutableString*linknew in linkArr) {
  17. //here some calculations code for parsing then next
  18. for (TFHppleElement *elements in contributorsNodes) {
  19. // 5
  20. for (TFHppleElement *child in elements.children) {
  21. if ([child.tagName isEqualToString:@"img"]) {
  22. // 7
  23. @try {
  24. NSString*url = [child.attributes objectForKey:@"src"];
  25.  
  26. NSMutableDictionary*dict = [[feeds objectAtIndex:k] mutableCopy];
  27. [dict setObject:url forKey:@"image"];
  28. [feeds removeObjectAtIndex:k];
  29. [feeds insertObject:dict atIndex:k];
  30.  
  31. NSIndexPath*index = [NSIndexPath indexPathForRow:k inSection:0];
  32.  
  33. [self.myTbl reloadRowsAtIndexPaths:@[index] withRowAnimation:UITableViewRowAnimationNone];
  34.  
  35.  
  36. }
  37. @catch (NSException *e) {}
  38. }
  39. }
  40. }k++;
  41. }
  42. });
  43. }
Add Comment
Please, Sign In to add comment