If you’re implementing a custom animation transition for your presentation, 
just follow this guide:

https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/CustomizingtheTransitionAnimations.html

The transition context object provides the container view that is involved in 
displaying the subviews during transition. Then because you seem to be looking 
for interactive animation driven by gestures, you can implement 
startInteractiveTransition(_:) on your custom animation controller that 
conforms to UIViewControllerInteractiveTransitioning.

That animation controller can implement the 
UIViewControllerTransitioningDelegate and be the transitioningDelegate.

I don’t know about setting up all of these with segues though. I’d recommend to 
just programatically create the view controllers.
On 13 Nov 2018, 6:46 AM +0800, Rick Mann <rm...@latencyzero.com>, wrote:
> I'm having a really hard time finding a definitive guide to custom modal 
> presentations in iOS.
>
> Nothing I've found online over two days of searching seems correct.
>
> I'm using a Storyboard and want to wire a segue from a button to my view 
> controller. I want it to slide up partway from an edge of the screen, but 
> stop partway across (i.e. not fill the screen). In some orientations/devices, 
> I want it to come up from the bottom. In others, I want it to come in from 
> the right. When presented from the bottom, it should be draggable to reveal 
> more of the drawer (when presented from the right, it's on iPad and always 
> fits), so it needs a interruptible animation the user can scrub through.
>
> Apple's own videos show making a UIStoryboardSegue subclass and making that 
> the UIViewControllerTransitioningDelegate. It's not strictly necessary to 
> make a UIPresentationController subclass, as you can still provide the 
> UIViewControllerAnimatedTransitioning implementations when doing this. But I 
> can't seem to get iOS to ask my custom segue for a UIPresentationController; 
> the method to vend that is never called.
>
> I also can't figure out who's responsible for adding the view to the view 
> hierarchy, is it the UIPresentationController subclass or the 
> UIViewControllerAnimatedTransitioning implementation? Who should respond to 
> the various pan and tap gesture recognizers I'll inevitably need to install?
>
> I appreciate any guidance. Thanks!
>
> --
> Rick Mann
> rm...@latencyzero.com
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/armand.jesse%40gmail.com
>
> This email sent to armand.je...@gmail.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to