Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem With UitableView Refreshing
    text
    copied!<p>I cant refresh tableView it is crashing without any exception.i am placing my code below.please let me know where i have gone wrong..</p> <pre><code> -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 103; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if(indexPath.row==[self.NewsArray count]) { MoreLoadingViewCell *cell = (MoreLoadingViewCell *)[tableView dequeueReusableCellWithIdentifier:@"MyCell"]; if(cell==nil) { [[NSBundle mainBundle] loadNibNamed:@"MoreLoadingViewCell" owner:self options:nil]; cell = moreViewCell; cell.selectionStyle = UITableViewCellSelectionStyleNone; //cell.backgroundView=nil; } return cell; } else { NewsCell *newsCell = (NewsCell *)[tableView dequeueReusableCellWithIdentifier:@"NewsCell"]; if (newsCell == nil) { NSLog(@"create adcell object"); [[NSBundle mainBundle] loadNibNamed:@"NewsCell" owner:self options:nil]; newsCell=newsCellobject; } NewsObjectClass *object; object=[self.NewsArray objectAtIndex:indexPath.row]; NSString *title=[object valueForKey:@"title"]; NSString *description=[object valueForKey:@"Description"]; NSString *dateString=[object valueForKey:@"NewsDate"]; newsCell.secondLabel.text=title; newsCell.thirdLabel.text=description; NSDateFormatter *dateFormatter=[[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"]; NSDate *date=[dateFormatter dateFromString:dateString]; [dateFormatter setDateFormat:@"YYYY MMM,dd hh:mm a"]; NSString *date_new=[dateFormatter stringFromDate:date]; NSLog(@"date is------ %@",date_new); newsCell.DateLabel.text=date_new; return newsCell; } } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSLog(@"-----------------array count is----------------------- %d",[self.NewsArray count]); if ([self.NewsArray count] == 0) { return 0; } return [self.NewsArray count]+1; } - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { if(refreshing) { NSLog(@"I am a big BUG, hehe hahahaha"); [spinner startAnimating]; [self performSelector:@selector(getDetails:) withObject:@"0" afterDelay:1.0]; //self.refreshing=NO; } } - (void) scrollViewDidScroll:(UIScrollView *)scrollView{ tempView.frame = CGRectMake(0,-80 - scrollView.contentOffset.y , 320,80); if(scrollView.contentOffset.y &lt; -60) { lbl.text = @"Release to Update"; } else { lbl.text = @"Pull down to Update"; } } - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { if(scrollView.contentOffset.y&lt;-60 &amp;&amp; !refreshing) { refreshing=YES; } } ` </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload