In an app I\'m working on, I have a plain style UITableView that can contain a section containing zero rows. I want to be able to scroll to this section using scrollToRowAtI
Since using:
[NSIndexPath indexPathForRow:NSNotFound inSection:EXAMPLE]
Broken for me in Xcode 11.3.1 (iOS simulator - 13.3) I decided to use:
NSUInteger index = [self.sectionTypes indexOfObject:@(EXAMPLE)];
if (index != NSNotFound) {
CGRect rect = [self.tableView rectForSection:index];
[self.tableView scrollRectToVisible:rect animated:YES];
}