iOS how to implement flyout navigation

chrisb69chrisb69 PTMember ✭✭

Hi

I have looked at several examples found in the component store regarding flyout navigation. The samples work for the most part and they show how to use one or the other component but they make it hard to understand how the component works internally. In order to learn the ropes, I'd like to implement flyout navigation from scratch. Would appreciate if someone could let me know if I am on the right track with the following approach:

  1. we would start a single view controller - the root
  2. I would have to instantiate a UIPanGestureRecognizer (with a gesture handler method) in the root controller's ViewDidLoad method and add it to the view with this.View.AddGestureRecognizer, right?
  3. in the gesture handler I would have to handle 3 states: Began, Changes and Ended
  4. Began: I would instantiate the flyout-navigation view (suppose this could be a standard view or tableview, ...), add it to the current view controller.
    Q: Would I instantiate and add a view or a viewcontroller? I would basically display it's right edge at the very left side of the screen (assuming we slide in from left to right)
  5. Changed: Move the view to the right until the whole view is shown
  6. Ended - is there anything I would have to do here?
  7. So now the slide-in is displayed; if I have some menu items there, how do I close the view and pass the information of which menu was selected to the root view???

This all sounds logical to me but who knows - maybe I got this all backwards. Either way please help me out.

Thanks,

Chris

Sign In or Register to comment.