Here is the code I\'m using:
if (appDelegate.currentMainIndexPath != nil /* && doesPathExistInTableView */)
{
[tblView scrollToRowAtIndexPath:appDele
You can use this. Pass it indexpath's row and section
Objective C:
-(BOOL) isRowPresentInTableView:(int)row withSection:(int)section
{
if(section < [self.tableView numberOfSections])
{
if(row < [self.tableView numberOfRowsInSection:section])
{
return YES;
}
}
return NO;
}
Swift 3:
func isRowPresentInTableView(indexPath: IndexPath) -> Bool{
if indexPath.section < tableView.numberOfSections{
if indexPath.row < tableView.numberOfRows(inSection: indexPath.section){
return true
}
}
return false
}