Oscar Swanros
Oscar Swanros

Reputation: 19969

Trouble using/understanding JASidePanels control

I'm trying to implement a Facebook-like menu in my application, and I found JASidePanels.

Followed the instructions on the GitHub page and it works well, as expected. What I can't understand is how the CenterViewController is going to change when the user taps on a cell of the LeftViewController (assuming, of course, that LeftViewController has a UITableView in it).

Can anyone explain how this happens?

Upvotes: 0

Views: 461

Answers (1)

Rui Peres
Rui Peres

Reputation: 25917

The change happens here:

- (void)_changeCenterPanelTapped:(id)sender {
    self.sidePanelController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[JACenterViewController alloc] init]];
}

So in your UITableViewDelegate, when the:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

is called, you need to handle it with this:

 self.sidePanelController.centerPanel = ...;

Upvotes: 1

Related Questions