1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //
- // MainNavigationController.swift
- // JSJP_Student_sw
- //
- // Created by Ning.ge on 2023/5/30.
- //
- import UIKit
- import RxSwift
- final class MainNavigationController: UINavigationController {
- override func viewDidLoad() {
- super.viewDidLoad()
- self.modalPresentationStyle = .fullScreen
- self.interactivePopGestureRecognizer?.delegate = self
-
- self.navigationBar.setBackgroundImage(UIImage.size(CGSize(width: 1, height: 1)).color(UIColor.white).image, for: .default)
-
- self.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.db_lightBlack]
-
- }
-
- override func pushViewController(_ viewController: UIViewController, animated: Bool){
- if children.count > 0 {
- viewController.hidesBottomBarWhenPushed = true
- let backItem = UIBarButtonItem(image: NYImage.Home.back?.withRenderingMode(.alwaysOriginal), style: .plain, target: self, action: #selector(back))
- viewController.navigationItem.leftBarButtonItems = [backItem]
- }
- super.pushViewController(viewController, animated: animated)
- }
-
- @objc private func back() {
-
- self.popViewController(animated: true)
-
- }
- }
- //extension MainNavigationController: UIGestureRecognizerDelegate {}
|