SLExpandableTableView icon indicating copy to clipboard operation
SLExpandableTableView copied to clipboard

Delegate method to control the animation of a cell after collapsing

Open ljesus opened this issue 10 years ago • 2 comments

I added this method to the delegate to control the animation, since if you closed a cell which was expanded at the bottom of the screen and still went outside the screen, the tableview would scroll all the way to the top.

ljesus avatar Feb 10 '15 11:02 ljesus

I needed some time to think about this and I don't think a delegate method - (BOOL)tableView:(SLExpandableTableView *)tableView shouldAnimateScrollToSection:(NSUInteger)section; is the appropriate pattern for this feature. How about a new enum property expandingSectionPosition which lets you specify to open sections at SPLExpandingSectionPositionTop, SPLExpandingSectionPositionBottom or SPLExpandingSectionPositionUnspecified with a default value of SPLExpandingSectionPositionTop.

OliverLetterer avatar Feb 21 '15 14:02 OliverLetterer

I have two big annoyances with auto scrolls. Does this pull request solve any of those?

  1. When expanding if the expanded rows are outside the screen the table should auto scroll
  2. When collapsing the current auto scroll that makes the header the first visible row of the table should be disabled. It's really annoying to the user

fotiDim avatar Feb 21 '15 15:02 fotiDim