matej / MBPullDownController

MBPullDownController, an iOS container view controller for pullable scroll view interfaces.

Home Page:www.bukovinski.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to swap out the front view after didSelecting a table cell in the back view?

cannyboy opened this issue · comments

Can I put in a new (or previously initialised) view in the front view, after selecting from the back list. So it acts in a similar way to the now ubiquitous Facebook / Youtube / etc style side-menu?

Should be possible and now, with the above fix, the front controller should remain in it's current state when the switch is performed. You can either assign a new frontController altogether, or simply modify the fontController's view, as illustrated in the demo app.

Could you possibly elaborate on switching out the front view controller? As far as I can tell, I must:

  1. Init a second UITableViewController
  2. Init a new MBPullDownController and set it to self.pullDownController
  3. Init another original UITableViewController and set it to the existing frontController of the pullDownController
  4. Then do [self.pullDownController changeFrontControllerFrom:first to:second];

Doing the above only results in a transparent UITableView covering the screen, with a white view as the pullable controller. When I try to move either view, the white view immediately snaps to the top and refuses to be moved again.

Just assign a new controller to the frontController property of the existing pull down controller. That should be all it takes.

pullDownController.frontController = [UITableViewController new];

I see. For some reason settings the new controller's table view style to grouped was causing the above mentioned bug. Thanks.