使用/理解JASidePanels控件时遇到问题

使用/理解JASidePanels控件时遇到问题

问题描述:

我试图在我的应用程序中实现一个类似Facebook的菜单,并且我找到了JASidePanels使用/理解JASidePanels控件时遇到问题

按照GitHub页面上的说明进行操作,并按预期工作。我无法理解的是,当用户点击LeftViewController的一个单元时(假设,当然,LeftViewController中有一个UITableView),CenterViewController将如何改变。

任何人都可以解释这是怎么发生的?

的变化发生在这里:

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

因此,在你UITableViewDelegate,当:

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

被调用时,你需要这样来处理它:

self.sidePanelController.centerPanel = ...; 
+0

我m asuming'...'应该是我想要显示的ViewController? – 2013-04-24 21:40:23

+0

是的,奥斯卡,确切地说。 – Peres 2013-04-25 05:59:10