//
//  NavigationControllerDelegate.swift
//  PaiaiUIKit
//
//  Created by FFIB on 2019/1/16.
//  Copyright © 2019 FFIB. All rights reserved.
//

import UIKit

public protocol NavigationControllerDelegate: class {
    func navigationController(_ navigationController: UINavigationController,
                              willShow viewController: UIViewController, animated: Bool)

    func navigationController(_ navigationController: UINavigationController,
                              didShow viewController: UIViewController, animated: Bool)

    func navigationController(_ navigationController: UINavigationController,
                              animationControllerFor operation: UINavigationController.Operation,
                              from fromVC: UIViewController,
                              to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
}

public extension NavigationControllerDelegate {

    func navigationController(_ navigationController: UINavigationController,
                              willShow viewController: UIViewController, animated: Bool) {}

    func navigationController(_ navigationController: UINavigationController,
                              didShow viewController: UIViewController, animated: Bool) {}

    func navigationController(_ navigationController: UINavigationController,
                              animationControllerFor operation: UINavigationController.Operation,
                              from fromVC: UIViewController,
                              to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return nil
    }
}