|
//
// UIViewController+Navigation.swift
// PaiaiUIKit
//
// Created by FFIB on 2019/1/15.
// Copyright © 2019 FFIB. All rights reserved.
//
import UIKit
/// MARK: extension
public extension UIViewController {
func popToRootController() {
navigationController?.popToRootViewController(animated: true)
}
func pushController(_ vc: UIViewController, animted: Bool = true) {
navigationController?.pushViewController(vc, animated: animted)
}
func popToController(_ vc: UIViewController, animated: Bool = true) {
navigationController?.popToViewController(vc, animated: animated)
}
func presentController(_ vc: UIViewController, animated: Bool = true) {
present(vc, animated: animated, completion: nil)
}
func dismissController(animated: Bool = true) {
dismiss(animated: animated, completion: nil)
}
}
|