MoviaBox/Thimra/Base/Controller/SPNavigationController.swift
2025-04-24 11:14:21 +08:00

38 lines
1013 B
Swift

//
// SPNavigationController.swift
// Thimra
//
// Created by on 2025/4/8.
//
import UIKit
class SPNavigationController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
self.jx_transitionAwake()
self.view.backgroundColor = .backgroundColor()
// Do any additional setup after loading the view.
}
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
if children.count > 0 {
viewController.hidesBottomBarWhenPushed = true
}
super.pushViewController(viewController, animated: animated)
}
override func setViewControllers(_ viewControllers: [UIViewController], animated: Bool) {
for (index, value) in viewControllers.enumerated() {
if index != 0 {
value.hidesBottomBarWhenPushed = true
}
}
super.setViewControllers(viewControllers, animated: animated)
}
}