Skip to content

TLCollapsibleTableViewController #61

@Droppix

Description

@Droppix

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions