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

Closed
cannyboy opened this Issue Mar 29, 2013 · 4 comments

Comments

Projects
None yet
3 participants

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?

Owner

matej commented Apr 3, 2013

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.

matej closed this Apr 3, 2013

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.

Owner

matej commented May 20, 2013

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.

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