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:
- we would start a single view controller - the root
- 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?
- in the gesture handler I would have to handle 3 states: Began, Changes and Ended
- 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)
- Changed: Move the view to the right until the whole view is shown
- Ended - is there anything I would have to do here?
- 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.