创建base
This commit is contained in:
16
keyBoard/Class/Base/VC/BaseNavigationController.h
Normal file
16
keyBoard/Class/Base/VC/BaseNavigationController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// BaseNavigationController.h
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BaseNavigationController : UINavigationController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
28
keyBoard/Class/Base/VC/BaseNavigationController.m
Normal file
28
keyBoard/Class/Base/VC/BaseNavigationController.m
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// BaseNavigationController.m
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import "BaseNavigationController.h"
|
||||
|
||||
@interface BaseNavigationController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation BaseNavigationController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
|
||||
if (self.viewControllers.count > 0) {
|
||||
viewController.hidesBottomBarWhenPushed = true;
|
||||
}
|
||||
[super pushViewController:viewController animated:animated];
|
||||
}
|
||||
|
||||
@end
|
||||
16
keyBoard/Class/Home/VC/HomeVC.h
Normal file
16
keyBoard/Class/Home/VC/HomeVC.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// HomeVC.h
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HomeVC : UIViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
31
keyBoard/Class/Home/VC/HomeVC.m
Normal file
31
keyBoard/Class/Home/VC/HomeVC.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// HomeVC.m
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import "HomeVC.h"
|
||||
|
||||
@interface HomeVC ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation HomeVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
16
keyBoard/Class/Main/VC/BaseTabBarController.h
Normal file
16
keyBoard/Class/Main/VC/BaseTabBarController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// BaseTabBarController.h
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BaseTabBarController : UITabBarController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
33
keyBoard/Class/Main/VC/BaseTabBarController.m
Normal file
33
keyBoard/Class/Main/VC/BaseTabBarController.m
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// BaseTabBarController.m
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import "BaseTabBarController.h"
|
||||
#import "HomeVC.h"
|
||||
#import "MyVC.h"
|
||||
|
||||
@interface BaseTabBarController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation BaseTabBarController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
16
keyBoard/Class/Me/VC/MyVC.h
Normal file
16
keyBoard/Class/Me/VC/MyVC.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MyVC.h
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MyVC : UIViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
31
keyBoard/Class/Me/VC/MyVC.m
Normal file
31
keyBoard/Class/Me/VC/MyVC.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// MyVC.m
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2025/10/29.
|
||||
//
|
||||
|
||||
#import "MyVC.h"
|
||||
|
||||
@interface MyVC ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation MyVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user