• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom UIViewController transitions with segues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom UIViewController transitions with segues


  • Subject: Re: Custom UIViewController transitions with segues
  • From: Roland King <email@hidden>
  • Date: Thu, 31 Dec 2015 10:14:55 +0800

> On 31 Dec 2015, at 09:12, Rick Mann <email@hidden> wrote:
>
> I have a UICollectionView in a UINavigationController, and I'd like to customize the transition from one to the next on push. So I set up the first VC as UIViewControllerTransitioningDelegate, and in prepareForSegue(_:sender:) set the destination VC's transitioningDelegate to self.
>
> But my delegate methods never get called. The docs say to set modalPresentationStyle to .Custom, but that has no effect (also, it's a bit weird since this is not technically a modal presentation, is it?).
>
> Search for solutions online turns up only custom segues, which is not really what I want.
>
> Is it even possible to do this with segues? What am I missing?
>
> TIA,

My thought here is that push != present, ie pushViewController(_:animated) doesn’t do the same thing as presentViewController(_:animated:completion) and that push calls the former and other modes call the latter. I dunno what I’d try, the whole UIViewController custom transitioning thing confuses the bananas out of me and I never found the WWDC videos on them to be as helpful as I wished. Perhaps change the push to a present to get it on the screen, then when you’re done with the transition, call pushViewController( vc, animated : false ) to fix up the nav stack. That will probably look really ugly as the nav bar will likely just snap to the new content.

There’s probably 18 other ways to do it. I’d bung some hooks into any methods I could find which run early in the viewcontroller presentation lifecycle and see if there’s a transition coordinator or animation coordinator or whatever objects transitions create which I could hook into and animate alongside.

In general .. having fiddled with custom transitions when the were new and shiny .. I don’t bother with them any more.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom UIViewController transitions with segues
      • From: Rick Mann <email@hidden>
References: 
 >Custom UIViewController transitions with segues (From: Rick Mann <email@hidden>)

  • Prev by Date: Custom UIViewController transitions with segues
  • Next by Date: Re: Custom UIViewController transitions with segues
  • Previous by thread: Custom UIViewController transitions with segues
  • Next by thread: Re: Custom UIViewController transitions with segues
  • Index(es):
    • Date
    • Thread