123456789101112131415161718192021222324252627282930313233343536373839 |
- import Foundation
- 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)
- }
- }
|