• 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: UINavigationController back gesture animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UINavigationController back gesture animation


  • Subject: Re: UINavigationController back gesture animation
  • From: Milton Moura <email@hidden>
  • Date: Wed, 15 Jun 2016 15:32:53 +0000

You are trying to access it before any animation / transition takes place.

From the docs:

"The transition coordinator object associated with a currently active transition or nil if no transition is in progress.” (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/#//apple_ref/occ/instm/UIViewController/transitionCoordinator <https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/#//apple_ref/occ/instm/UIViewController/transitionCoordinator>)

You should get a valid reference to the transitionCoordinator in the viewWillAppear or viewWillDisappear, depending on where you need it.

Also, look here for an example usage:

https://www.raizlabs.com/dev/2016/05/smarter-animated-row-deselection-ios/ <https://www.raizlabs.com/dev/2016/05/smarter-animated-row-deselection-ios/>

> On 15 Jun 2016, at 14:57, Torsten Curdt <email@hidden> wrote:
>
> Since I am getting nowhere with this I thought maybe at least I could know
> when the animation finishes.
> So I was trying it like this:
>
> extension UINavigationController {
>    func pushViewController(viewController: UIViewController, animated:
> Bool, completion: (Void -> Void)) {
>        pushViewController(viewController, animated: animated)
>
>        if let coordinator = transitionCoordinator() where animated {
>            coordinator.animateAlongsideTransition(nil) { _ in
>                completion()
>            }
>        } else {
>            completion()
>        }
>    }
> }
>
> ...but the coordinator is just nil.
>
> Any thoughts?
> _______________________________________________
>
> 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

_______________________________________________

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


References: 
 >UINavigationController back gesture animation (From: Torsten Curdt <email@hidden>)
 >Re: UINavigationController back gesture animation (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: WWDC 2016 direct download
  • Next by Date: Re: OK - I must be missing something simple here.
  • Previous by thread: Re: UINavigationController back gesture animation
  • Next by thread: Properties: A question of style
  • Index(es):
    • Date
    • Thread