43 lines
1.5 KiB
Objective-C
43 lines
1.5 KiB
Objective-C
//
|
|
// HBNavigationController.m
|
|
// QinJiuTV
|
|
//
|
|
// Created by 秦九 on 2024/4/28.
|
|
//
|
|
|
|
#import "HBNavigationController.h"
|
|
|
|
@interface HBNavigationController ()
|
|
|
|
@end
|
|
|
|
@implementation HBNavigationController
|
|
|
|
- (void)viewDidLoad {
|
|
[super viewDidLoad];
|
|
// if(@available(iOS 15.0, *)) {
|
|
// UINavigationBarAppearance * appearnce = [UINavigationBarAppearance new];
|
|
//// [appearnce configureWithDefaultBackground];
|
|
// self.navigationBar.standardAppearance = appearnce;
|
|
// self.navigationBar.scrollEdgeAppearance = self.navigationBar.standardAppearance;
|
|
// }
|
|
}
|
|
|
|
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
|
|
|
if (self.viewControllers.count > 0) {
|
|
viewController.hidesBottomBarWhenPushed = YES;
|
|
NSString * navigation_btn_back = @"publics_navigationBar_back";
|
|
UIBarButtonItem *leftBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed: navigation_btn_back
|
|
renderingMode:UIImageRenderingModeAlwaysOriginal]
|
|
style:UIBarButtonItemStylePlain
|
|
target:viewController
|
|
action:@selector(backController:)];
|
|
viewController.navigationItem.leftBarButtonItem = leftBtn;
|
|
|
|
}
|
|
[super pushViewController:viewController animated:animated];
|
|
}
|
|
|
|
@end
|