暂无描述

NavigationControllerDelegate.swift 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839
  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,
  23. didShow viewController: UIViewController, animated: Bool) {}
  24. func navigationController(_ navigationController: UINavigationController,
  25. animationControllerFor operation: UINavigationController.Operation,
  26. from fromVC: UIViewController,
  27. to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
  28. return nil
  29. }
  30. }