-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Hi,
A small bug: If you have 0 rows in the section, the app crash.
Suggestion for correction:
In the file "UITableView+ScrollOptimizer.m":
- (void)optimizeScrollPositionForSection:(NSInteger)section options:(TLTableViewScrollOptions)options topInset:(CGFloat)topInset animated:(BOOL)animated
{
NSIndexPath *firstIndexPath = [NSIndexPath indexPathForRow:0 inSection:section];
NSInteger rows = [self.dataSource tableView:self numberOfRowsInSection:section];
if (rows) rows --;
NSIndexPath *lastIndexPath = [NSIndexPath indexPathForRow:rows inSection:section];
[self optimizeScrollPositionForIndexPaths:@[firstIndexPath, lastIndexPath] options:options topInset:topInset animated:animated];
}
Regards
Metadata
Metadata
Assignees
Labels
No labels