测试配置
This commit is contained in:
24
CustomKeyboard/Info.plist
Normal file
24
CustomKeyboard/Info.plist
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSExtension</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSExtensionAttributes</key>
|
||||||
|
<dict>
|
||||||
|
<key>IsASCIICapable</key>
|
||||||
|
<false/>
|
||||||
|
<key>PrefersRightToLeft</key>
|
||||||
|
<false/>
|
||||||
|
<key>PrimaryLanguage</key>
|
||||||
|
<string>en-US</string>
|
||||||
|
<key>RequestsOpenAccess</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<key>NSExtensionPointIdentifier</key>
|
||||||
|
<string>com.apple.keyboard-service</string>
|
||||||
|
<key>NSExtensionPrincipalClass</key>
|
||||||
|
<string>KeyboardViewController</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
12
CustomKeyboard/KeyboardViewController.h
Normal file
12
CustomKeyboard/KeyboardViewController.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// KeyboardViewController.h
|
||||||
|
// CustomKeyboard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/10/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface KeyboardViewController : UIInputViewController
|
||||||
|
|
||||||
|
@end
|
||||||
79
CustomKeyboard/KeyboardViewController.m
Normal file
79
CustomKeyboard/KeyboardViewController.m
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// KeyboardViewController.m
|
||||||
|
// CustomKeyboard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/10/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "KeyboardViewController.h"
|
||||||
|
|
||||||
|
static CGFloat KEYBOARDHEIGHT = 256;
|
||||||
|
|
||||||
|
@interface KeyboardViewController ()
|
||||||
|
@property (nonatomic, strong) UIButton *nextKeyboardButton;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation KeyboardViewController
|
||||||
|
|
||||||
|
- (void)updateViewConstraints {
|
||||||
|
[super updateViewConstraints];
|
||||||
|
|
||||||
|
// Add custom view sizing constraints here
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
//
|
||||||
|
// // Perform custom UI setup here
|
||||||
|
// self.nextKeyboardButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||||
|
//
|
||||||
|
// [self.nextKeyboardButton setTitle:NSLocalizedString(@"Next Keyboard", @"Title for 'Next Keyboard' button") forState:UIControlStateNormal];
|
||||||
|
// [self.nextKeyboardButton sizeToFit];
|
||||||
|
// self.nextKeyboardButton.translatesAutoresizingMaskIntoConstraints = NO;
|
||||||
|
//
|
||||||
|
// [self.nextKeyboardButton addTarget:self action:@selector(handleInputModeListFromView:withEvent:) forControlEvents:UIControlEventAllTouchEvents];
|
||||||
|
//
|
||||||
|
// [self.view addSubview:self.nextKeyboardButton];
|
||||||
|
//
|
||||||
|
// [self.nextKeyboardButton.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = YES;
|
||||||
|
// [self.nextKeyboardButton.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = YES;
|
||||||
|
|
||||||
|
[self setupUI];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)setupUI {
|
||||||
|
CGFloat toolBarHeight = 40;
|
||||||
|
CGFloat bottom = 5;
|
||||||
|
CGFloat buttonSpace = 8;
|
||||||
|
CGFloat eachButtonHeight = (KEYBOARDHEIGHT - toolBarHeight - 10 - 8 * 3 - bottom) / 4;
|
||||||
|
|
||||||
|
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 30)];
|
||||||
|
view.backgroundColor = [UIColor redColor];
|
||||||
|
[self.view addSubview:view];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)viewWillLayoutSubviews
|
||||||
|
{
|
||||||
|
self.nextKeyboardButton.hidden = !self.needsInputModeSwitchKey;
|
||||||
|
[super viewWillLayoutSubviews];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)textWillChange:(id<UITextInput>)textInput {
|
||||||
|
// The app is about to change the document's contents. Perform any preparation here.
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)textDidChange:(id<UITextInput>)textInput {
|
||||||
|
// The app has just changed the document's contents, the document context has been updated.
|
||||||
|
|
||||||
|
UIColor *textColor = nil;
|
||||||
|
if (self.textDocumentProxy.keyboardAppearance == UIKeyboardAppearanceDark) {
|
||||||
|
textColor = [UIColor whiteColor];
|
||||||
|
} else {
|
||||||
|
textColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
|
[self.nextKeyboardButton setTitleColor:textColor forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
18
CustomKeyboard/PrefixHeader.pch
Normal file
18
CustomKeyboard/PrefixHeader.pch
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// PrefixHeader.pch
|
||||||
|
// CustomKeyboard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/10/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef PrefixHeader_pch
|
||||||
|
#define PrefixHeader_pch
|
||||||
|
|
||||||
|
// Include any system framework and library headers here that should be included in all compilation units.
|
||||||
|
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
|
||||||
|
|
||||||
|
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
|
||||||
|
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.width
|
||||||
|
#define imageNamed(s) [UIImage imageNamed:s]
|
||||||
|
|
||||||
|
#endif /* PrefixHeader_pch */
|
||||||
16
CustomKeyboard/View/KBToolBar.h
Normal file
16
CustomKeyboard/View/KBToolBar.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// KBToolBar.h
|
||||||
|
// CustomKeyboard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/10/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface KBToolBar : UIView
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
20
CustomKeyboard/View/KBToolBar.m
Normal file
20
CustomKeyboard/View/KBToolBar.m
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// KBToolBar.m
|
||||||
|
// CustomKeyboard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/10/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "KBToolBar.h"
|
||||||
|
|
||||||
|
@implementation KBToolBar
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Only override drawRect: if you perform custom drawing.
|
||||||
|
// An empty implementation adversely affects performance during animation.
|
||||||
|
- (void)drawRect:(CGRect)rect {
|
||||||
|
// Drawing code
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -6,32 +6,70 @@
|
|||||||
objectVersion = 77;
|
objectVersion = 77;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
04C6EABA2EAF86530089C901 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04C6EAAE2EAF86530089C901 /* Assets.xcassets */; };
|
||||||
|
04C6EABC2EAF86530089C901 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 04C6EAB12EAF86530089C901 /* LaunchScreen.storyboard */; };
|
||||||
|
04C6EABD2EAF86530089C901 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 04C6EAB42EAF86530089C901 /* Main.storyboard */; };
|
||||||
|
04C6EABE2EAF86530089C901 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C6EAAD2EAF86530089C901 /* AppDelegate.m */; };
|
||||||
|
04C6EABF2EAF86530089C901 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C6EAB22EAF86530089C901 /* main.m */; };
|
||||||
|
04C6EAC12EAF86530089C901 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C6EAB82EAF86530089C901 /* ViewController.m */; };
|
||||||
|
04C6EACE2EAF87020089C901 /* CustomKeyboard.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 04C6EAC62EAF87020089C901 /* CustomKeyboard.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||||
|
04C6EAD82EAF870B0089C901 /* KeyboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C6EAD62EAF870B0089C901 /* KeyboardViewController.m */; };
|
||||||
|
04C6EADD2EAF8CEB0089C901 /* KBToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C6EADC2EAF8CEB0089C901 /* KBToolBar.m */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
04C6EACC2EAF87020089C901 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 727EC74B2EAF848B00B36487 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 04C6EAC52EAF87020089C901;
|
||||||
|
remoteInfo = CustomKeyboard;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
04C6EAD32EAF87020089C901 /* Embed Foundation Extensions */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 13;
|
||||||
|
files = (
|
||||||
|
04C6EACE2EAF87020089C901 /* CustomKeyboard.appex in Embed Foundation Extensions */,
|
||||||
|
);
|
||||||
|
name = "Embed Foundation Extensions";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
04C6EAAC2EAF86530089C901 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||||
|
04C6EAAD2EAF86530089C901 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||||
|
04C6EAAE2EAF86530089C901 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
04C6EAAF2EAF86530089C901 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
04C6EAB02EAF86530089C901 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
04C6EAB22EAF86530089C901 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||||
|
04C6EAB32EAF86530089C901 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
04C6EAB72EAF86530089C901 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||||
|
04C6EAB82EAF86530089C901 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||||
|
04C6EAC62EAF87020089C901 /* CustomKeyboard.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = CustomKeyboard.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
04C6EAD42EAF870B0089C901 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
04C6EAD52EAF870B0089C901 /* KeyboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyboardViewController.h; sourceTree = "<group>"; };
|
||||||
|
04C6EAD62EAF870B0089C901 /* KeyboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyboardViewController.m; sourceTree = "<group>"; };
|
||||||
|
04C6EADB2EAF8CEB0089C901 /* KBToolBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBToolBar.h; sourceTree = "<group>"; };
|
||||||
|
04C6EADC2EAF8CEB0089C901 /* KBToolBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBToolBar.m; sourceTree = "<group>"; };
|
||||||
|
04C6EADE2EAF8D680089C901 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
|
||||||
727EC7532EAF848B00B36487 /* keyBoard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = keyBoard.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
727EC7532EAF848B00B36487 /* keyBoard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = keyBoard.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
|
||||||
727EC76A2EAF848C00B36487 /* Exceptions for "keyBoard" folder in "keyBoard" target */ = {
|
|
||||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
|
||||||
membershipExceptions = (
|
|
||||||
Info.plist,
|
|
||||||
);
|
|
||||||
target = 727EC7522EAF848B00B36487 /* keyBoard */;
|
|
||||||
};
|
|
||||||
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
|
||||||
|
|
||||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
|
||||||
727EC7552EAF848B00B36487 /* keyBoard */ = {
|
|
||||||
isa = PBXFileSystemSynchronizedRootGroup;
|
|
||||||
exceptions = (
|
|
||||||
727EC76A2EAF848C00B36487 /* Exceptions for "keyBoard" folder in "keyBoard" target */,
|
|
||||||
);
|
|
||||||
path = keyBoard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
04C6EAC32EAF87020089C901 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
727EC7502EAF848B00B36487 /* Frameworks */ = {
|
727EC7502EAF848B00B36487 /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -42,10 +80,48 @@
|
|||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
|
04C6EAB92EAF86530089C901 /* keyBoard */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
04C6EAAC2EAF86530089C901 /* AppDelegate.h */,
|
||||||
|
04C6EAAD2EAF86530089C901 /* AppDelegate.m */,
|
||||||
|
04C6EAAE2EAF86530089C901 /* Assets.xcassets */,
|
||||||
|
04C6EAAF2EAF86530089C901 /* Info.plist */,
|
||||||
|
04C6EAB12EAF86530089C901 /* LaunchScreen.storyboard */,
|
||||||
|
04C6EAB22EAF86530089C901 /* main.m */,
|
||||||
|
04C6EAB42EAF86530089C901 /* Main.storyboard */,
|
||||||
|
04C6EAB72EAF86530089C901 /* ViewController.h */,
|
||||||
|
04C6EAB82EAF86530089C901 /* ViewController.m */,
|
||||||
|
);
|
||||||
|
path = keyBoard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
04C6EAD72EAF870B0089C901 /* CustomKeyboard */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
04C6EADA2EAF8C7B0089C901 /* View */,
|
||||||
|
04C6EAD42EAF870B0089C901 /* Info.plist */,
|
||||||
|
04C6EAD52EAF870B0089C901 /* KeyboardViewController.h */,
|
||||||
|
04C6EAD62EAF870B0089C901 /* KeyboardViewController.m */,
|
||||||
|
04C6EADE2EAF8D680089C901 /* PrefixHeader.pch */,
|
||||||
|
);
|
||||||
|
path = CustomKeyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
04C6EADA2EAF8C7B0089C901 /* View */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
04C6EADB2EAF8CEB0089C901 /* KBToolBar.h */,
|
||||||
|
04C6EADC2EAF8CEB0089C901 /* KBToolBar.m */,
|
||||||
|
);
|
||||||
|
path = View;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
727EC74A2EAF848B00B36487 = {
|
727EC74A2EAF848B00B36487 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
727EC7552EAF848B00B36487 /* keyBoard */,
|
04C6EAB92EAF86530089C901 /* keyBoard */,
|
||||||
|
04C6EAD72EAF870B0089C901 /* CustomKeyboard */,
|
||||||
727EC7542EAF848B00B36487 /* Products */,
|
727EC7542EAF848B00B36487 /* Products */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -54,6 +130,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
727EC7532EAF848B00B36487 /* keyBoard.app */,
|
727EC7532EAF848B00B36487 /* keyBoard.app */,
|
||||||
|
04C6EAC62EAF87020089C901 /* CustomKeyboard.appex */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -61,6 +138,25 @@
|
|||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
|
04C6EAC52EAF87020089C901 /* CustomKeyboard */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 04C6EAD02EAF87020089C901 /* Build configuration list for PBXNativeTarget "CustomKeyboard" */;
|
||||||
|
buildPhases = (
|
||||||
|
04C6EAC22EAF87020089C901 /* Sources */,
|
||||||
|
04C6EAC32EAF87020089C901 /* Frameworks */,
|
||||||
|
04C6EAC42EAF87020089C901 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = CustomKeyboard;
|
||||||
|
packageProductDependencies = (
|
||||||
|
);
|
||||||
|
productName = CustomKeyboard;
|
||||||
|
productReference = 04C6EAC62EAF87020089C901 /* CustomKeyboard.appex */;
|
||||||
|
productType = "com.apple.product-type.app-extension";
|
||||||
|
};
|
||||||
727EC7522EAF848B00B36487 /* keyBoard */ = {
|
727EC7522EAF848B00B36487 /* keyBoard */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 727EC76B2EAF848C00B36487 /* Build configuration list for PBXNativeTarget "keyBoard" */;
|
buildConfigurationList = 727EC76B2EAF848C00B36487 /* Build configuration list for PBXNativeTarget "keyBoard" */;
|
||||||
@@ -68,13 +164,12 @@
|
|||||||
727EC74F2EAF848B00B36487 /* Sources */,
|
727EC74F2EAF848B00B36487 /* Sources */,
|
||||||
727EC7502EAF848B00B36487 /* Frameworks */,
|
727EC7502EAF848B00B36487 /* Frameworks */,
|
||||||
727EC7512EAF848B00B36487 /* Resources */,
|
727EC7512EAF848B00B36487 /* Resources */,
|
||||||
|
04C6EAD32EAF87020089C901 /* Embed Foundation Extensions */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
04C6EACD2EAF87020089C901 /* PBXTargetDependency */,
|
||||||
fileSystemSynchronizedGroups = (
|
|
||||||
727EC7552EAF848B00B36487 /* keyBoard */,
|
|
||||||
);
|
);
|
||||||
name = keyBoard;
|
name = keyBoard;
|
||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
@@ -90,8 +185,12 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
BuildIndependentTargetsInParallel = 1;
|
BuildIndependentTargetsInParallel = 1;
|
||||||
|
CLASSPREFIX = KB;
|
||||||
LastUpgradeCheck = 2600;
|
LastUpgradeCheck = 2600;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
|
04C6EAC52EAF87020089C901 = {
|
||||||
|
CreatedOnToolsVersion = 16.4;
|
||||||
|
};
|
||||||
727EC7522EAF848B00B36487 = {
|
727EC7522EAF848B00B36487 = {
|
||||||
CreatedOnToolsVersion = 26.0.1;
|
CreatedOnToolsVersion = 26.0.1;
|
||||||
};
|
};
|
||||||
@@ -112,31 +211,133 @@
|
|||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
727EC7522EAF848B00B36487 /* keyBoard */,
|
727EC7522EAF848B00B36487 /* keyBoard */,
|
||||||
|
04C6EAC52EAF87020089C901 /* CustomKeyboard */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
727EC7512EAF848B00B36487 /* Resources */ = {
|
04C6EAC42EAF87020089C901 /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
727EC7512EAF848B00B36487 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
04C6EABA2EAF86530089C901 /* Assets.xcassets in Resources */,
|
||||||
|
04C6EABC2EAF86530089C901 /* LaunchScreen.storyboard in Resources */,
|
||||||
|
04C6EABD2EAF86530089C901 /* Main.storyboard in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
04C6EAC22EAF87020089C901 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
04C6EADD2EAF8CEB0089C901 /* KBToolBar.m in Sources */,
|
||||||
|
04C6EAD82EAF870B0089C901 /* KeyboardViewController.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
727EC74F2EAF848B00B36487 /* Sources */ = {
|
727EC74F2EAF848B00B36487 /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
04C6EABE2EAF86530089C901 /* AppDelegate.m in Sources */,
|
||||||
|
04C6EABF2EAF86530089C901 /* main.m in Sources */,
|
||||||
|
04C6EAC12EAF86530089C901 /* ViewController.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
04C6EACD2EAF87020089C901 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 04C6EAC52EAF87020089C901 /* CustomKeyboard */;
|
||||||
|
targetProxy = 04C6EACC2EAF87020089C901 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
04C6EAB12EAF86530089C901 /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
04C6EAB02EAF86530089C901 /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
04C6EAB42EAF86530089C901 /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
04C6EAB32EAF86530089C901 /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
|
04C6EAD12EAF87020089C901 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = TN6HHV45BB;
|
||||||
|
GCC_PREFIX_HEADER = CustomKeyboard/PrefixHeader.pch;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = CustomKeyboard/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "卡拉斯输入法";
|
||||||
|
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 15;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@executable_path/../../Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.keyBoard.CustomKeyboard;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
04C6EAD22EAF87020089C901 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = TN6HHV45BB;
|
||||||
|
GCC_PREFIX_HEADER = CustomKeyboard/PrefixHeader.pch;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = CustomKeyboard/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "卡拉斯输入法";
|
||||||
|
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 15;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@executable_path/../../Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.keyBoard.CustomKeyboard;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
727EC76C2EAF848C00B36487 /* Debug */ = {
|
727EC76C2EAF848C00B36487 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
@@ -144,20 +345,22 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = CBD35U2N52;
|
DEVELOPMENT_TEAM = TN6HHV45BB;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = keyBoard/Info.plist;
|
INFOPLIST_FILE = keyBoard/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "卡拉斯输入法";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "-.keyBoard";
|
PRODUCT_BUNDLE_IDENTIFIER = com.keyBoard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
@@ -172,20 +375,22 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = CBD35U2N52;
|
DEVELOPMENT_TEAM = TN6HHV45BB;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = keyBoard/Info.plist;
|
INFOPLIST_FILE = keyBoard/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "卡拉斯输入法";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "-.keyBoard";
|
PRODUCT_BUNDLE_IDENTIFIER = com.keyBoard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
@@ -314,6 +519,15 @@
|
|||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
|
04C6EAD02EAF87020089C901 /* Build configuration list for PBXNativeTarget "CustomKeyboard" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
04C6EAD12EAF87020089C901 /* Debug */,
|
||||||
|
04C6EAD22EAF87020089C901 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
727EC74E2EAF848B00B36487 /* Build configuration list for PBXProject "keyBoard" */ = {
|
727EC74E2EAF848B00B36487 /* Build configuration list for PBXProject "keyBoard" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIWindow *window;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
|
#import "ViewController.h"
|
||||||
|
|
||||||
@interface AppDelegate ()
|
@interface AppDelegate ()
|
||||||
|
|
||||||
@@ -16,25 +17,12 @@
|
|||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
// Override point for customization after application launch.
|
// Override point for customization after application launch.
|
||||||
|
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;
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - UISceneSession lifecycle
|
|
||||||
|
|
||||||
|
|
||||||
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
|
|
||||||
// Called when a new scene session is being created.
|
|
||||||
// Use this method to select a configuration to create the new scene with.
|
|
||||||
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
|
|
||||||
// Called when the user discards a scene session.
|
|
||||||
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
|
|
||||||
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -1,25 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict/>
|
||||||
<key>UIApplicationSceneManifest</key>
|
|
||||||
<dict>
|
|
||||||
<key>UIApplicationSupportsMultipleScenes</key>
|
|
||||||
<false/>
|
|
||||||
<key>UISceneConfigurations</key>
|
|
||||||
<dict>
|
|
||||||
<key>UIWindowSceneSessionRoleApplication</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>UISceneConfigurationName</key>
|
|
||||||
<string>Default Configuration</string>
|
|
||||||
<key>UISceneDelegateClassName</key>
|
|
||||||
<string>SceneDelegate</string>
|
|
||||||
<key>UISceneStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
//
|
|
||||||
// SceneDelegate.h
|
|
||||||
// keyBoard
|
|
||||||
//
|
|
||||||
// Created by 张伟 on 2025/10/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
|
|
||||||
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
|
|
||||||
|
|
||||||
@property (strong, nonatomic) UIWindow * window;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
//
|
|
||||||
// SceneDelegate.m
|
|
||||||
// keyBoard
|
|
||||||
//
|
|
||||||
// Created by 张伟 on 2025/10/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "SceneDelegate.h"
|
|
||||||
|
|
||||||
@interface SceneDelegate ()
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation SceneDelegate
|
|
||||||
|
|
||||||
|
|
||||||
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
|
|
||||||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
|
|
||||||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
|
|
||||||
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)sceneDidDisconnect:(UIScene *)scene {
|
|
||||||
// Called as the scene is being released by the system.
|
|
||||||
// This occurs shortly after the scene enters the background, or when its session is discarded.
|
|
||||||
// Release any resources associated with this scene that can be re-created the next time the scene connects.
|
|
||||||
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)sceneDidBecomeActive:(UIScene *)scene {
|
|
||||||
// Called when the scene has moved from an inactive state to an active state.
|
|
||||||
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)sceneWillResignActive:(UIScene *)scene {
|
|
||||||
// Called when the scene will move from an active state to an inactive state.
|
|
||||||
// This may occur due to temporary interruptions (ex. an incoming phone call).
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)sceneWillEnterForeground:(UIScene *)scene {
|
|
||||||
// Called as the scene transitions from the background to the foreground.
|
|
||||||
// Use this method to undo the changes made on entering the background.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)sceneDidEnterBackground:(UIScene *)scene {
|
|
||||||
// Called as the scene transitions from the foreground to the background.
|
|
||||||
// Use this method to save data, release shared resources, and store enough scene-specific state information
|
|
||||||
// to restore the scene back to its current state.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#import "ViewController.h"
|
#import "ViewController.h"
|
||||||
|
|
||||||
@interface ViewController ()
|
@interface ViewController ()
|
||||||
|
@property (nonatomic,strong)UITextField *textField;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ViewController
|
@implementation ViewController
|
||||||
@@ -16,6 +16,14 @@
|
|||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
// Do any additional setup after loading the view.
|
// Do any additional setup after loading the view.
|
||||||
|
self.view.backgroundColor = [UIColor grayColor];
|
||||||
|
self.textField = [[UITextField alloc] init];
|
||||||
|
self.textField.frame = CGRectMake(100, 100, 200, 40);
|
||||||
|
self.textField.layer.borderWidth = 1;
|
||||||
|
self.textField.layer.borderColor = [UIColor redColor].CGColor;
|
||||||
|
[self.view addSubview:self.textField];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user