创建base

This commit is contained in:
2025-10-29 14:17:26 +08:00
parent 72b6dbb157
commit 045d5eaff8
11 changed files with 367 additions and 5 deletions

View File

@@ -25,6 +25,10 @@
04FC95762EB095DE007BD342 /* KBFunctionPasteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95752EB095DE007BD342 /* KBFunctionPasteView.m */; };
04FC95792EB09BC8007BD342 /* KBKeyBoardMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95782EB09BC8007BD342 /* KBKeyBoardMainView.m */; };
04FC95B22EB0B2CC007BD342 /* KBSettingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95B12EB0B2CC007BD342 /* KBSettingView.m */; };
04FC95C92EB1E4C9007BD342 /* BaseNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95C82EB1E4C9007BD342 /* BaseNavigationController.m */; };
04FC95CC2EB1E780007BD342 /* BaseTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95CB2EB1E780007BD342 /* BaseTabBarController.m */; };
04FC95CF2EB1E7A1007BD342 /* HomeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95CE2EB1E7A1007BD342 /* HomeVC.m */; };
04FC95D22EB1E7AE007BD342 /* MyVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 04FC95D12EB1E7AE007BD342 /* MyVC.m */; };
7A36414DFDA5BEC9B7D2E318 /* Pods_CustomKeyboard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C1092FB2B452F95B15D4263 /* Pods_CustomKeyboard.framework */; };
A1B2C3D42EB0A0A100000001 /* KBFunctionTagCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D32EB0A0A100000001 /* KBFunctionTagCell.m */; };
A1B2C3E22EB0C0A100000001 /* KBNetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3E12EB0C0A100000001 /* KBNetworkManager.m */; };
@@ -91,6 +95,14 @@
04FC95782EB09BC8007BD342 /* KBKeyBoardMainView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBKeyBoardMainView.m; sourceTree = "<group>"; };
04FC95B02EB0B2CC007BD342 /* KBSettingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBSettingView.h; sourceTree = "<group>"; };
04FC95B12EB0B2CC007BD342 /* KBSettingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBSettingView.m; sourceTree = "<group>"; };
04FC95C72EB1E4C9007BD342 /* BaseNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseNavigationController.h; sourceTree = "<group>"; };
04FC95C82EB1E4C9007BD342 /* BaseNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseNavigationController.m; sourceTree = "<group>"; };
04FC95CA2EB1E780007BD342 /* BaseTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseTabBarController.h; sourceTree = "<group>"; };
04FC95CB2EB1E780007BD342 /* BaseTabBarController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseTabBarController.m; sourceTree = "<group>"; };
04FC95CD2EB1E7A1007BD342 /* HomeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeVC.h; sourceTree = "<group>"; };
04FC95CE2EB1E7A1007BD342 /* HomeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeVC.m; sourceTree = "<group>"; };
04FC95D02EB1E7AE007BD342 /* MyVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyVC.h; sourceTree = "<group>"; };
04FC95D12EB1E7AE007BD342 /* MyVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyVC.m; sourceTree = "<group>"; };
2C1092FB2B452F95B15D4263 /* Pods_CustomKeyboard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CustomKeyboard.framework; sourceTree = BUILT_PRODUCTS_DIR; };
51FE7C4C42C2255B3C1C4128 /* Pods-keyBoard.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-keyBoard.release.xcconfig"; path = "Target Support Files/Pods-keyBoard/Pods-keyBoard.release.xcconfig"; sourceTree = "<group>"; };
727EC7532EAF848B00B36487 /* keyBoard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = keyBoard.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -127,6 +139,7 @@
04C6EAB92EAF86530089C901 /* keyBoard */ = {
isa = PBXGroup;
children = (
04FC95BF2EB1E3B1007BD342 /* Class */,
04C6EAE32EAF942E0089C901 /* VC */,
04C6EAAC2EAF86530089C901 /* AppDelegate.h */,
04C6EAAD2EAF86530089C901 /* AppDelegate.m */,
@@ -199,6 +212,149 @@
path = Model;
sourceTree = "<group>";
};
04FC95B32EB1E3B1007BD342 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
04FC95B42EB1E3B1007BD342 /* V */ = {
isa = PBXGroup;
children = (
);
path = V;
sourceTree = "<group>";
};
04FC95B52EB1E3B1007BD342 /* VC */ = {
isa = PBXGroup;
children = (
04FC95CD2EB1E7A1007BD342 /* HomeVC.h */,
04FC95CE2EB1E7A1007BD342 /* HomeVC.m */,
);
path = VC;
sourceTree = "<group>";
};
04FC95B62EB1E3B1007BD342 /* Home */ = {
isa = PBXGroup;
children = (
04FC95B32EB1E3B1007BD342 /* M */,
04FC95B42EB1E3B1007BD342 /* V */,
04FC95B52EB1E3B1007BD342 /* VC */,
);
path = Home;
sourceTree = "<group>";
};
04FC95B72EB1E3B1007BD342 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
04FC95B82EB1E3B1007BD342 /* V */ = {
isa = PBXGroup;
children = (
);
path = V;
sourceTree = "<group>";
};
04FC95B92EB1E3B1007BD342 /* VC */ = {
isa = PBXGroup;
children = (
04FC95CA2EB1E780007BD342 /* BaseTabBarController.h */,
04FC95CB2EB1E780007BD342 /* BaseTabBarController.m */,
);
path = VC;
sourceTree = "<group>";
};
04FC95BA2EB1E3B1007BD342 /* Main */ = {
isa = PBXGroup;
children = (
04FC95B72EB1E3B1007BD342 /* M */,
04FC95B82EB1E3B1007BD342 /* V */,
04FC95B92EB1E3B1007BD342 /* VC */,
);
path = Main;
sourceTree = "<group>";
};
04FC95BB2EB1E3B1007BD342 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
04FC95BC2EB1E3B1007BD342 /* V */ = {
isa = PBXGroup;
children = (
);
path = V;
sourceTree = "<group>";
};
04FC95BD2EB1E3B1007BD342 /* VC */ = {
isa = PBXGroup;
children = (
04FC95D02EB1E7AE007BD342 /* MyVC.h */,
04FC95D12EB1E7AE007BD342 /* MyVC.m */,
);
path = VC;
sourceTree = "<group>";
};
04FC95BE2EB1E3B1007BD342 /* Me */ = {
isa = PBXGroup;
children = (
04FC95BB2EB1E3B1007BD342 /* M */,
04FC95BC2EB1E3B1007BD342 /* V */,
04FC95BD2EB1E3B1007BD342 /* VC */,
);
path = Me;
sourceTree = "<group>";
};
04FC95BF2EB1E3B1007BD342 /* Class */ = {
isa = PBXGroup;
children = (
04FC95C62EB1E4AB007BD342 /* Base */,
04FC95BA2EB1E3B1007BD342 /* Main */,
04FC95B62EB1E3B1007BD342 /* Home */,
04FC95BE2EB1E3B1007BD342 /* Me */,
);
path = Class;
sourceTree = "<group>";
};
04FC95C32EB1E4AB007BD342 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
04FC95C42EB1E4AB007BD342 /* V */ = {
isa = PBXGroup;
children = (
);
path = V;
sourceTree = "<group>";
};
04FC95C52EB1E4AB007BD342 /* VC */ = {
isa = PBXGroup;
children = (
04FC95C72EB1E4C9007BD342 /* BaseNavigationController.h */,
04FC95C82EB1E4C9007BD342 /* BaseNavigationController.m */,
);
path = VC;
sourceTree = "<group>";
};
04FC95C62EB1E4AB007BD342 /* Base */ = {
isa = PBXGroup;
children = (
04FC95C32EB1E4AB007BD342 /* M */,
04FC95C42EB1E4AB007BD342 /* V */,
04FC95C52EB1E4AB007BD342 /* VC */,
);
path = Base;
sourceTree = "<group>";
};
2C53A0856097DCFBE7B55649 /* Pods */ = {
isa = PBXGroup;
children = (
@@ -379,10 +535,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-keyBoard/Pods-keyBoard-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-keyBoard/Pods-keyBoard-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-keyBoard/Pods-keyBoard-frameworks.sh\"\n";
@@ -436,9 +596,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
04FC95D22EB1E7AE007BD342 /* MyVC.m in Sources */,
043FBCD22EAF97630036AFE1 /* KBPermissionViewController.m in Sources */,
04C6EABE2EAF86530089C901 /* AppDelegate.m in Sources */,
04FC95C92EB1E4C9007BD342 /* BaseNavigationController.m in Sources */,
04FC95CF2EB1E7A1007BD342 /* HomeVC.m in Sources */,
04C6EABF2EAF86530089C901 /* main.m in Sources */,
04FC95CC2EB1E780007BD342 /* BaseTabBarController.m in Sources */,
04C6EAC12EAF86530089C901 /* ViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

View File

@@ -10,17 +10,16 @@
#import "KBPermissionViewController.h"
#import <AFNetworking/AFNetworking.h>
#import <Bugly/Bugly.h>
#import "BaseTabBarController.h"
static NSString * const kKBKeyboardExtensionBundleId = @"com.keyBoard.CustomKeyboard";
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
ViewController *vc = [[ViewController alloc] init];
self.window.rootViewController = vc;
[self setupRootVC];
///
[self getNetJudge];
/// Bugly
@@ -35,6 +34,15 @@ static NSString * const kKBKeyboardExtensionBundleId = @"com.keyBoard.CustomKeyb
return YES;
}
- (void)setupRootVC{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
BaseTabBarController *vc = [[BaseTabBarController alloc] init];
self.window.rootViewController = vc;
}
#pragma mark - Permission presentation
- (UIViewController *)kb_topMostViewController

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@@ -16,6 +16,9 @@
/// 三方
#import <Masonry/Masonry.h>
/// 项目
#import "BaseNavigationController.h"
#endif /* KeyBoardPrefixHeader_pch */