TLIndexPathTools icon indicating copy to clipboard operation
TLIndexPathTools copied to clipboard

TLCollapsibleTableViewController

Open Droppix opened this issue 10 years ago • 0 comments

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

Droppix avatar Nov 08 '15 18:11 Droppix