ios - Application crashed after two minutes -


I am creating an application that takes data from the web services and shows it in the table view When it launches it works like a magic, but when I see the table more than 5 times more than 7 times it was not working and it was so that it was stopped. If I do not do any scrolling on the table, then the app also crashes after 2 to 3 minutes.

The code is as follows:

  - (zero) viewDidoadload {[self.interviewTableSetoshoshorazentalScroll Indicator: No]; [Set the retired view Current Circle Indicator: No]; PageNum = 0; [Super viewedload]; NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "http://www.truemanindiamagazine.com/webservice/interview.php?page=%d", page news]]; NSDTA * Data = [NSDTATA DATAVITY CONTENT URL OF: URL]; NSError * error; NSDictionary * json = [NSJSNSReelization JSONObjectWithData: Data Options: NSJSONReadingMutableContainers Error: & amp; Error]; NSLog (@ "% @", json); Self.dataArray = [Jason ObjectForcae: @ "Data"]; NSLog (@ "images,% @", self.dataArray); } - (zero) Fetch data: (NSDT *) Accountability {NSERR * Error; NSDictionary * json = [NSJSANSIJJonObjectWithData: responsedata option: kNilOptions error: & amp; Error]; If ([[Jason Objectforky: @ "Data"] Hackindofclass: [NSERE class]]) {NSARE * NewErray = (NSARRA *) [Jason ObjectFor: @ "Data"]; [Swadata Array add object framer: Neueira]; [Self.interviewTableRedloadData]; NSLog (@ "images,% @", self.dataArray); } If (self.dataArray.count == 0) {self.interviewTable.scrollEnabled = NO; } Other {self.interviewTable.scrollEnabled = YES; }} - (NSInteger) numberOfSectionsInTableView: (UITableView *) table view {return self.dataArray.count; } - (NSInteger) Table view: (UITableView *) table view numberofrox inaction: (NSInteger) section {if (self.dataArray == zero} self.dataArray.count & lt; 1) {return 0; } And {return1; Returns SwatataArere Coat; }} - (UITableViewCell *) TableView: (UITableView *) Table View CellForAind Pound: (NSIndexPath *) Index Path {Fixed NSString * cellidentifier = @ "cell"; CustumCell * cell = [tableview dequeueReusableCellWithIdentifier: cellidentifier]; If (cell == zero) {NSArray * nib = [[NSBundle mainBundle] loadNibNamed: @ "CustumCell" owner: self choice: zero]; Cell = [nib object at index: 0]; } NSDictionary * dict = [self.dataArray objectAtIndex: indexPath.section]; NSString * img2 = [dict Price ForKey: @ "post_image"]; [Cell.inteviewImage sd_setImageWithURL: [nsur URLWithString: [img2 stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]] Placeholder image: [UIImage imageNamed: @ "Hisoka.jpg"] Option: SDWebImage progressive download complete: ^ (UIImage * image, NSError * error, SDImageCacheType cacheType , NSURL * ImageURL) {Dispatch_Associate (sending_out_man_close ()), ^ {NSLog (@ "downloaded");}); }]; NSString * name = [dict Price ForKey: @ "post_title"]; Cell.headLabel.text = name; NSString * des = [dict Price ForKey: @ "post_content"]; Cell.descripLabel.text = des; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; [DateFormatter setDateFormat: @ "yyyy-MM-dd hh: mm: ss"]; NSString * date = [dict Price ForKey: @ "post_date"]; NSDate * dateNotFormatted = [dateFormatter dateFromString: date]; [DateFormatter setDateFormat: @ "d-MMM-YYYY"]; NSString * dateFormatted = [dateFormatter stringFromDate: dateNotFormatted]; NSLog (@ "date% @", formatted date); Cell.dateLabel.text = dateFormatted; Return cell; } - (zero) scrollViewDidScroll: (UIScrollView *) scrollView {pageNum = pageNum + 1; NSLog (@ "Page Number,% d", Page New); [Self union]; } - (zero) getData {NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "http://www.truemanindiamagazine.com/webservice/interview.php?page=%d", page New]]; Dispatches_assink, (^ {ZDTA = [NSDTATA DATAVITY content of URL: url]; [self-selection selectoronManetred: @Selector (FHDData with Object: JDATA Waiting Date: Yes);)); }  

When I put a breakpoint, it shows an error in the line

  NSDictionary * json = [NSJSNAS algorithm JSONObjectWithData: responsedata option: kNilOptions error: & Amp; Error ];  

Please give me a solution.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -