No Description

NavigationControllerDelegate.swift 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // NavigationControllerDelegate.swift
  3. // PaiaiUIKit
  4. //
  5. // Created by FFIB on 2019/1/16.
  6. // Copyright © 2019 FFIB. All rights reserved.
  7. //
  8. import UIKit
  9. public protocol NavigationControllerDelegate: class {
  10. func navigationController(_ navigationController: UINavigationController,
  11. willShow viewController: UIViewController, animated: Bool)
  12. func navigationController(_ navigationController: UINavigationController,
  13. didShow viewController: UIViewController, animated: Bool)
  14. func navigationController(_ navigationController: UINavigationController,
  15. animationControllerFor operation: UINavigationController.Operation,
  16. from fromVC: UIViewController,
  17. to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
  18. }
  19. public extension NavigationControllerDelegate {
  20. func navigationController(_ navigationController: UINavigationController,
  21. willShow viewController: UIViewController, animated: Bool) {}
  22. func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) {}
  23. func navigationController(_ navigationController: UINavigationController,
  24. animationControllerFor operation: UINavigationController.Operation,
  25. from fromVC: UIViewController,
  26. to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
  27. return nil
  28. }
  29. }