Friday 15 May 2015

objective c - Viewing images in feeds parsed with MWFeedParser -


I'm using to download feed in my app so far it's working fine - though, I'm unable to parse each article for. I currently have the code:

  // MWFeedItem.hNsDita * First Img; @protecti (nonatomic, raten) NSDTA * first img; MWFeedItem.m synthesize and adds dealoc   
  // RootViewController.m - (NSString *) getFirstImage: (NSString *) htmlString {NSScanner * theScanner; NSString * text = Zero; TheScanner = [NSScanner scannerWithString: htmlString]; // starts the tag [theScanner scanUpToString: @ "img src = \" inString: zero]; if ([theScanner isAtEnd] == no) {NSInteger newLoc = [theScanner scanLocation] 10 [theScanner setScanLocation: NewLoc]; // tag [theScanner scanUpToString: @ "\" "String: & amp; In the lesson; } Return text; } (Zero) feedParser: (MWFeedParser *) Parser didParseFeedItem: (MWFeedItem *) Item {NSLog (@ "Pars feed item: one ????% one ????", item.title); NSString * str_imageUrl = [self-contained film: item: table]; Item.firstImg = [NSDATA DATAVITY CONTENT OFF URL: [NSDRAEL URLWithString: str_imageUrl]]; If (item) is parsed [addObject: item]; }   

I can not see the image with this code and I'm not sure why.

try It is separate from MWFeedParser and an NSArray of images happens to every feedItem.

No comments:

Post a Comment