8

同じUINavigationControllerに2つのUIViewがあります。私はいくつかのカスタムアニメーションスタイルを適用したいので、私はUINavigationController内のプレゼンテーションの進行のパーセンテージを知りたいと思います。これはどうすればいいですか?UINavigationControllerのトランジションパーセンテージを取得

私はこのような関数たい:

class ExampleNavigationController: UINavigationController { 


    func viewControllerMoves(from: UIViewController, to: UIViewController, progress: CGFloat) { 
     //I can read here how far the animation is and apply custom animation styles 

    } 

} 

この機能は、ユーザーによる更新時に呼び出されなければなりません: 例 - >http://www.latet.nl/appvideo.mov

私はこれをどのように行うのですか?

例スクリーンは

割合は0.50

50/50

割合が1.00

100%

割合が0.00

あろうであろうであろう10

0%

答えて

0

UIViewControllerTransitionCoordinatorプロトコルは、必要なものを正確に提供します。 UIViewControllerTransitionCoordinatorContextには、対話的なトランジションに有効なpercentCompleteがあります。非インタラクティブなトランジションでは、アニメーション化する必要があります。

関連する問題