46 lines
1.2 KiB
Swift
46 lines
1.2 KiB
Swift
//
|
|
// BRNavigationController.swift
|
|
// BeeReel
|
|
//
|
|
// Created by 长沙鸿瑶 on 2025/6/24.
|
|
//
|
|
|
|
import UIKit
|
|
import FDFullscreenPopGesture
|
|
|
|
class BRNavigationController: UINavigationController {
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
fd_fullscreenPopGestureRecognizer.isEnabled = true
|
|
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
|
|
//MARK:-------------- 状态栏样式 --------------
|
|
override var childForStatusBarStyle: UIViewController? {
|
|
return self.topViewController
|
|
}
|
|
|
|
override var childForStatusBarHidden: UIViewController? {
|
|
return self.topViewController
|
|
}
|
|
|
|
}
|