LRScrollingSidebarController icon indicating copy to clipboard operation
LRScrollingSidebarController copied to clipboard

scrollsToTop Support For UITableViews

Open insanj opened this issue 11 years ago • 2 comments

Is there any way to allow for scrollsToTop when using a UITableView inside of the scrolling sidebar controller? Since this property is irrelevant to this library, it would be great to have it available for subviews.

insanj avatar Nov 02 '14 19:11 insanj

Hey @insanj. Sorry for the late reply.

It's as simple as overriding - (void)controllerIsVisible:(BOOL)controllerIsVisible and setting the proper scrollsToTop property. So, let's imagine you have one tableView in each of the three child controllers. In that case, you should do the following:

#pragma mark - ISThreePanelProtocol

- (void)controllerIsVisible:(BOOL)controllerIsVisible
{
    self.tableView.scrollsToTop = controllerIsVisible;
}

Let me know if that works.

luisrecuenco avatar Nov 10 '14 08:11 luisrecuenco

Hy @luisrecuenco i had same problem this is solved thank you. But if i change main controller, the scroll to top won't work again. In Main controller also has got controllerIsVisible. I manually change to false before replace main controller.

holbalzs avatar Nov 27 '16 23:11 holbalzs