I have a view at the bottom of my view controller. How can I set up an interactive transition such that as I drag the view up vertically (perhaps using UIPanGestureRecognizer
), another view controller is pushed up?
Similar to the default navigation controller behaviour with swiping left and right to push/pop, except this would be vertical.
You can use UIDynamicAnimator class for animation.
You will have to use AttachmentBehavior for such kind of attachment animation. It's subclass of UIDynamicAnimator
. Please check this question . It might help you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.