Skip to content

Delegate method to control the animation of a cell after collapsing#30

Open
ljesus wants to merge 5 commits intoOliverLetterer:masterfrom
ljesus:master
Open

Delegate method to control the animation of a cell after collapsing#30
ljesus wants to merge 5 commits intoOliverLetterer:masterfrom
ljesus:master

Conversation

@ljesus
Copy link

@ljesus ljesus commented Feb 10, 2015

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.

@OliverLetterer
Copy link
Owner

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.

@fotiDim
Copy link

fotiDim commented Feb 21, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants