|
//
// UINavigationController+NavigationBack.swift
// PaiaiUIKit
//
// Created by ffib on 2019/1/15.
// Copyright © 2019 yb. All rights reserved.
//
import UIKit
public extension UINavigationController {
func pushViewController<T: UIViewController & NavigationBackViewController>(_ vc: T, animted: Bool = true) {
vc.setupNavigationBackItem()
pushViewController(vc, animated: animted)
guard let recognizer = interactivePopGestureRecognizer else { return }
recognizer.isEnabled = true
recognizer.setDelegate(vc)
}
}
|