I have this simple code:
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
BGEditTextField * theTableViewCell = (BGEditTextField *) [self.tableView cellForRowAtIndexPath:indexPath];
theTableViewCell.displaytextField =true;
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
//self.helpFinishUpdating.viewNotToCover = theTableViewCell;
}
Everything is perfect except that I want
self.helpFinishUpdating.viewNotToCover = theTableViewCell
to be executed after
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES]; is done.
How would I achieve that?
The reason why I want to do so is because self.helpFinishUpdating.viewNotToCover = theTableViewCell; is sensitive toward the frame location of the UITableViewCell. I want the UITableViewCell to reach the final position first before executing that.
UITableViewDelegateconforms toUIScrollViewDelegate, so you can just implementscrollViewDidEndDecelerating:or whatever fits your needs.