MoviaBox/ShortPlay/Base/Extension/UINavigationController+SPAdd.swift
2025-04-09 18:24:58 +08:00

31 lines
830 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// UINavigationController+SPAdd.swift
// ShortPlay
//
// Created by on 2025/4/8.
//
import UIKit
extension UINavigationController {
/**
*/
func pushViewControllerAndDismissLastViewController(viewController: UIViewController, animated: Bool) {
var viewControllers = self.viewControllers
viewControllers.removeLast()
viewControllers.append(viewController)
self.setViewControllers(viewControllers, animated: animated)
}
//MARK:-------------- --------------
open override var childForStatusBarStyle: UIViewController? {
return self.topViewController
}
open override var childForStatusBarHidden: UIViewController? {
return self.topViewController
}
}