I have built two separate UIViewController
s: MainVC and 2ndVC. Now I am trying to connect them and achieve the effect presented on the image below:
When loaded, 2ndVC should be visible partially on top of MainVC (let's say 1/4 of the screen). On swipe up 2ndVC should cover whole screen and on swipe down it should go back to starting point. I have some buttons on MainVC which I would like to stay active when 2ndVC does not cover whole screen.
2ndVC's height will change dynamically dependently on data. It has scrollview inside which should be active only when it covers whole screen.
What is the best way to do that? Should 2ndVC be embedded in container view as a child view controller? Should I somehow animate constraints of 2ndVC programmatically on swipe?