This will require a custom container view controller. Simply put, you have a view controller that contains 2 view controllers (view 1 on the left and view 2 on the right).
You attach a panorama gesture to the container view, and when the user moves, you calculate the corresponding frame for each of the subview controllers. For instance. if the user pans to the right, you move view 2 to the right and bring view 1 to the left (by calling the controller methods of the child view as necessary).
When the gesture ends, you must check the end position in combination with the final pan direction to decide where you should place the view controllers. for example, if you finish panning on the right 90% of view 1 on the screen, you must completely move view 1 on the screen and view 2 screens. if you're done with 50% of each, you should use the pan direction to decide which view will remain on the screen.
source share