PanGesture slide-in half modal Bottom Card for UIKit + Swift
https://youtu.be/cI3Bzmq4EgY
Video tutorial :Why it is here: I spent the whole day creating a slide-out half modal screen for one of the freelance projects and just had to create a tutorial about it. Partly because was asked when I shared the result on Instagram, but mostly for future self do not browse documentation and tutorials again a few months later :)
- Works fine and tested on Xcode 11 & 12
- Used UIKit, UIPresentationController, and GestureRecognizer to get this result.
Documentation and tutorials:
- UIPresentationController : https://developer.apple.com/documentation/uikit/uipresentationcontroller
- raywenderlich tutorial: https://www.raywenderlich.com/3636807-uipresentationcontroller-tutorial-getting-started
- PanGesture + Codable slider UI tutorial: https://medium.com/@sarinyaswift/pangesture-slidable-view-swift-5-6718517f94a8
- Draggable modal view: https://www.youtube.com/watch?v=acPVLXQshYk&ab_channel=WilsonBalderrama