0

I'm interested in creating a view(controller) that is slideable over another.

For example, I have a container view with two VCs,

i want the bottom VC to be able to be dragged all the way to the top, covering the VC on top.

I know I need a PanGestureRecognizer, but not sure if I should be creating these viewcontrollers in storyboard or doing all of this programatically.

So far I have two viewcontrollers, in a containerVC, displaying all the content correctly. What I don't know is how to add a gestureRecognizer to the bottom VC and manipulate the position.

Should I add the recognizer to the ContainerVC, or to the ViewController that I'm dragging?

makthrow
  • 129
  • 1
  • 16
  • there is a similar post http://stackoverflow.com/questions/35035047/swift-show-another-view-controller-on-swipe-up-in-first-view-controller but it's kinda vague, i'd appreciate some more clarity – makthrow May 06 '17 at 19:38

1 Answers1

1

I am no sure what you want to do, but to me seems like a SideBar Menu. Theirs is a lot of libraries or implementation of that on the internet, I will put a link bellow, maybe it can help you, even this was not your idea.

https://github.com/jonkykong/SideMenu

Hope it helps, somehow

Tudor Popa
  • 710
  • 5
  • 8