├── .DS_Store
├── README.md
├── YBCustomKeyBoard
├── Assets.xcassets
│ ├── Contents.json
│ ├── iconfont-shanchu-2.imageset
│ │ ├── iconfont-shanchu-2.png
│ │ ├── iconfont-shanchu-2@2x.png
│ │ ├── iconfont-shanchu-2@3x.png
│ │ └── Contents.json
│ ├── iconfont-shanchu-4.imageset
│ │ ├── iconfont-shanchu-4.png
│ │ ├── iconfont-shanchu-4@2x.png
│ │ ├── iconfont-shanchu-4@3x.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.h
├── AppDelegate.h
├── main.m
├── Info.plist
├── YBCustomBoard.h
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
├── AppDelegate.m
├── ViewController.m
└── YBCustomBoard.m
├── YBCustomKeyBoard.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── gaoyanbin.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── xcuserdata
│ └── gaoyanbin.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── YBCustomKeyBoard.xcscheme
└── project.pbxproj
└── YBCustomKeyBoardTests
├── Info.plist
└── YBCustomKeyBoardTests.m
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/.DS_Store
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # YBCustomBoard
2 | 一个自定义键盘控件,在系统键盘的基础上重新布局控件,实现功能,可任意修改需要的键盘形式
3 | 代理方式或者block方式,调用非常方便
4 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/iconfont-shanchu-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/iconfont-shanchu-2.png
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/iconfont-shanchu-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/iconfont-shanchu-4.png
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/iconfont-shanchu-2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/iconfont-shanchu-2@2x.png
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/iconfont-shanchu-2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/iconfont-shanchu-2@3x.png
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/iconfont-shanchu-4@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/iconfont-shanchu-4@2x.png
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/iconfont-shanchu-4@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/iconfont-shanchu-4@3x.png
--------------------------------------------------------------------------------
/YBCustomKeyBoard.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard.xcodeproj/project.xcworkspace/xcuserdata/gaoyanbin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaoyanbin1314/YBCustomBoard/HEAD/YBCustomKeyBoard.xcodeproj/project.xcworkspace/xcuserdata/gaoyanbin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/YBCustomKeyBoard/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // YBCustomKeyBoard
4 | //
5 | // Created by 高艳彬 on 2017/4/23.
6 | // Copyright © 2017年 YBKit. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // YBCustomKeyBoard
4 | //
5 | // Created by 高艳彬 on 2017/4/23.
6 | // Copyright © 2017年 YBKit. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // YBCustomKeyBoard
4 | //
5 | // Created by 高艳彬 on 2017/4/23.
6 | // Copyright © 2017年 YBKit. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "iconfont-shanchu-2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "iconfont-shanchu-2@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "iconfont-shanchu-2@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/iconfont-shanchu-4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "iconfont-shanchu-4.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "iconfont-shanchu-4@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "iconfont-shanchu-4@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/YBCustomKeyBoard.xcodeproj/xcuserdata/gaoyanbin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | YBCustomKeyBoard.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 250E65381EAC887900E2DD58
16 |
17 | primary
18 |
19 |
20 | 250E65511EAC887900E2DD58
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/YBCustomKeyBoardTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/YBCustomKeyBoardTests/YBCustomKeyBoardTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // YBCustomKeyBoardTests.m
3 | // YBCustomKeyBoardTests
4 | //
5 | // Created by 高艳彬 on 2017/4/23.
6 | // Copyright © 2017年 YBKit. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface YBCustomKeyBoardTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation YBCustomKeyBoardTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/YBCustomBoard.h:
--------------------------------------------------------------------------------
1 | //
2 | // QBXKeyBoardCustomView.h
3 | // Qianbuxian_iPhone
4 | //
5 | // Created by 高艳彬 on 16/8/31.
6 | // Copyright © 2016年 JanChenyo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | // 注意只有以下两种数字键盘才有效果:UIKeyboardTypeNumberPad,UIKeyboardTypePhonePad;
13 |
14 | typedef void(^clickNumber)(NSString *deadline);
15 |
16 | typedef void(^clickDelete)();
17 |
18 | @protocol QBXKeyBoardCustomViewDelegate
19 |
20 | - (void)addNumbersWithMessage:(NSString *)message;
21 | - (void)deleteFunction:(NSString *)message;
22 | @end
23 |
24 |
25 | @interface YBCustomBoard : UIView
26 |
27 | @property (nonatomic, weak) id delegate;
28 |
29 | + (instancetype)sharedCustomKeyBoardView;
30 |
31 | // 删除自定义键盘
32 | + (void)removeCustomKeyBoardView;
33 |
34 |
35 |
36 | /**
37 | 设置自定义的身份证键盘
38 |
39 | @param clickNumber 点击按钮添加信息
40 | @param clickDelete 删除功能
41 | */
42 | + (void)setCustomKeyboardViewWithClickedNumber:(clickNumber )clickNumber clickedDelete:(clickDelete )clickDelete;
43 |
44 | + (void)setCustomKeyboardviewwithDelegate:(id )delegate;
45 |
46 | - (void)setCustomKeyboardViewWithClickedNumber:(clickNumber )clickNumber clickedDelete:(clickDelete )clickDelete;
47 |
48 | - (void)setCustomKeyboardviewwithDelegate:(id )delegate;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // YBCustomKeyBoard
4 | //
5 | // Created by 高艳彬 on 2017/4/23.
6 | // Copyright © 2017年 YBKit. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // YBCustomKeyBoard
4 | //
5 | // Created by 高艳彬 on 2017/4/23.
6 | // Copyright © 2017年 YBKit. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "YBCustomBoard.h"
11 |
12 | @interface ViewController (){
13 |
14 | UITextField *_idTextFieldView;
15 | }
16 |
17 | @end
18 |
19 | @implementation ViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 |
24 |
25 | // 启用系统键盘调用通知
26 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleKeyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
27 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleKeyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
28 |
29 |
30 |
31 | // textFieldView
32 |
33 | _idTextFieldView = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 200, 50)];
34 | _idTextFieldView.placeholder = @"自定义键盘启动";
35 | _idTextFieldView.keyboardType = UIKeyboardTypeNumberPad;
36 | [self.view addSubview:_idTextFieldView];
37 |
38 | UITextField *systemTextField = [[UITextField alloc] initWithFrame:CGRectMake(100, 200, 200, 50)];
39 | systemTextField.placeholder = @"系统键盘启动";
40 | systemTextField.keyboardType = UIKeyboardTypeNumberPad;
41 | [self.view addSubview:systemTextField];
42 |
43 | }
44 |
45 |
46 | #pragma mark --- NSNotificationEvent
47 | - (void)handleKeyboardWillShow:(NSNotification *)notification{
48 |
49 | if (_idTextFieldView.isFirstResponder) {
50 |
51 | [YBCustomBoard setCustomKeyboardViewWithClickedNumber:^(NSString *deadline) {
52 |
53 | _idTextFieldView.text = [_idTextFieldView.text stringByAppendingString:deadline];
54 | } clickedDelete:^{
55 |
56 | if (_idTextFieldView.text.length > 0) {
57 |
58 | _idTextFieldView.text = [_idTextFieldView.text substringToIndex:_idTextFieldView.text.length - 1];
59 | }
60 | }];
61 | }else{
62 |
63 | [YBCustomBoard removeCustomKeyBoardView];
64 | }
65 | }
66 |
67 | //实现通知处理
68 | - (void)handleKeyboardDidHide:(NSNotification *)notification{
69 |
70 | [YBCustomBoard removeCustomKeyBoardView];
71 | }
72 |
73 |
74 |
75 | - (void)didReceiveMemoryWarning {
76 | [super didReceiveMemoryWarning];
77 | // Dispose of any resources that can be recreated.
78 | }
79 |
80 |
81 | @end
82 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard.xcodeproj/xcuserdata/gaoyanbin.xcuserdatad/xcschemes/YBCustomKeyBoard.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard/YBCustomBoard.m:
--------------------------------------------------------------------------------
1 | //
2 | // QBXKeyBoardCustomView.m
3 | // Qianbuxian_iPhone
4 | //
5 | // Created by 高艳彬 on 16/8/31.
6 | // Copyright © 2016年 JanChenyo. All rights reserved.
7 | //
8 |
9 | #import "YBCustomBoard.h"
10 | #import
11 |
12 | @interface YBCustomBoard()
13 |
14 | @property (nonatomic ,copy) clickNumber clickNumber;
15 | @property (nonatomic ,copy) clickDelete clickDelete;
16 |
17 | @end
18 |
19 |
20 | @implementation YBCustomBoard
21 |
22 | // 单利模式
23 | +(instancetype)sharedCustomKeyBoardView{
24 |
25 | static YBCustomBoard *customKeyBoard = nil;
26 | static dispatch_once_t onceToken;
27 | dispatch_once(&onceToken, ^{
28 |
29 | customKeyBoard = [[YBCustomBoard alloc] init];
30 |
31 | });
32 |
33 | return customKeyBoard;
34 | }
35 | // 初始化
36 | // block
37 | + (void)setCustomKeyboardViewWithClickedNumber:(clickNumber )clickNumber clickedDelete:(clickDelete )clickDelete{
38 |
39 | NSLog(@"🍀🍀🍀🍀🍀🍀🍀🍀\n 1111");
40 | YBCustomBoard *customKeyBoard = [YBCustomBoard sharedCustomKeyBoardView];
41 | [customKeyBoard setCustomKeyboardViewWithClickedNumber:clickNumber clickedDelete:clickDelete];
42 |
43 | }
44 | // delegate
45 | + (void)setCustomKeyboardviewwithDelegate:(id )delegate{
46 |
47 | NSLog(@"🍀🍀🍀🍀🍀🍀🍀🍀\n 1111");
48 | YBCustomBoard *customKeyBoard = [YBCustomBoard sharedCustomKeyBoardView];
49 | [customKeyBoard setCustomKeyboardviewwithDelegate:delegate];
50 | }
51 |
52 | - (void)setCustomKeyboardViewWithClickedNumber:(clickNumber )clickNumber clickedDelete:(clickDelete)clickDelete{
53 |
54 | [self keyboardChange];
55 | YBCustomBoard *board = [YBCustomBoard sharedCustomKeyBoardView];
56 |
57 | board.clickNumber = clickNumber;
58 | board.clickDelete = clickDelete;
59 |
60 | }
61 |
62 | - (void)setCustomKeyboardviewwithDelegate:(id )delegate{
63 |
64 | NSLog(@"🍀🍀🍀🍀🍀🍀🍀🍀\n 2222");
65 |
66 | YBCustomBoard *board = [YBCustomBoard sharedCustomKeyBoardView];
67 | board.delegate = delegate;
68 | [self keyboardChange];
69 |
70 | }
71 |
72 |
73 | - (void)keyboardChange{
74 |
75 | // 找到展示的键盘界面
76 | UIView *keyboard = [self findKeyboard];
77 | YBCustomBoard *boardView = [YBCustomBoard sharedCustomKeyBoardView];
78 | boardView.frame = CGRectMake(0, 0, keyboard.frame.size.width, keyboard.frame.size.height);
79 | boardView.backgroundColor = [YBCustomBoard colorFromHexRGB:@"CCCCCC"];
80 | [keyboard addSubview:boardView];
81 |
82 |
83 |
84 | CGFloat width = (keyboard.frame.size.width )/3;
85 | CGFloat height = (keyboard.frame.size.height)/4;
86 |
87 | for (int i = 0 ; i < 12; i ++) {
88 |
89 | UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0 + i%3 * (width + 0.5), 0 + i/3 * (height + 0.5), width, height)];
90 |
91 | [button setTitleColor:[YBCustomBoard colorFromHexRGB:@"333333"] forState:UIControlStateNormal];
92 |
93 | button.layer.borderWidth = 0.25/2;
94 | button.layer.borderColor = [YBCustomBoard colorFromHexRGB:@"CCCCCC"].CGColor;
95 | if (i == 9) {
96 |
97 | [button setTitle:@"X" forState:UIControlStateNormal];
98 | }else if (i == 10){
99 |
100 | [button setTitle:@"0" forState:UIControlStateNormal];
101 | }else if (i == 11){
102 | // [button setTitle:@"删除" forState:UIControlStateNormal];
103 | [button setImage:[UIImage imageNamed:@"iconfont-shanchu-2"] forState:UIControlStateNormal];
104 | [button setImage:[UIImage imageNamed:@"iconfont-shanchu-4"] forState:UIControlStateHighlighted];
105 | }else{
106 |
107 | [button setTitle:[NSString stringWithFormat:@"%d",i + 1] forState:UIControlStateNormal];
108 | }
109 |
110 | if (i == 11) {
111 |
112 | // button.titleLabel.font = [UIFont systemFontOfSize:18];
113 | [button setBackgroundImage:[YBCustomBoard imageWithColor:[YBCustomBoard colorFromHexRGB:@"D2D5DC"] size:button.frame.size] forState:UIControlStateNormal];
114 |
115 | [button setBackgroundImage:[YBCustomBoard imageWithColor:[YBCustomBoard colorFromHexRGB:@"C2C4CB"] size:button.frame.size] forState:UIControlStateHighlighted];
116 | [button addTarget:boardView action:@selector(delete:) forControlEvents:UIControlEventTouchUpInside];
117 | }else{
118 |
119 | button.titleLabel.font = [UIFont systemFontOfSize:30];
120 | [button setBackgroundImage:[YBCustomBoard imageWithColor:[YBCustomBoard colorFromHexRGB:@"FFFFFF"] size:button.frame.size] forState:UIControlStateNormal];
121 | [button setBackgroundImage:[YBCustomBoard imageWithColor:[YBCustomBoard colorFromHexRGB:@"EBEBEB"] size:button.frame.size] forState:UIControlStateHighlighted];
122 | [button addTarget:boardView action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
123 | }
124 | [boardView addSubview:button];
125 | }
126 | }
127 |
128 | #pragma mark --- Event
129 | - (void)click:(UIButton *)sender{
130 |
131 | // dididid 1057 1103
132 | // 系统键盘默认音 1104
133 | SystemSoundID soundID = 1104;
134 |
135 | AudioServicesPlaySystemSound(soundID);
136 |
137 | YBCustomBoard *board = [YBCustomBoard sharedCustomKeyBoardView];
138 |
139 | // 优先 block方法
140 | if (board.clickNumber) {
141 |
142 | board.clickNumber(sender.titleLabel.text);
143 | return;
144 | }
145 | if (board.delegate) {
146 |
147 | [board addNumbersWithMessage:sender.titleLabel.text];
148 | return;
149 | }
150 | }
151 |
152 | - (void)delete:(UIButton *)sender{
153 |
154 | AudioServicesPlaySystemSound(1104);
155 | YBCustomBoard *board = [YBCustomBoard sharedCustomKeyBoardView];
156 |
157 | if (board.clickDelete) {
158 |
159 | board.clickDelete();
160 | return;
161 | }
162 | if (board.delegate) {
163 |
164 | [board deleteFunction:sender.titleLabel.text];
165 | return;
166 | }
167 |
168 | }
169 |
170 | - (UIView *)findKeyboard
171 | {
172 | UIView *keyboardView = nil;
173 | NSArray *windows = [[UIApplication sharedApplication] windows];
174 | for (UIWindow *window in [windows reverseObjectEnumerator])//逆序效率更高,因为键盘总在上方
175 | {
176 | keyboardView = [self findKeyboardInView:window];
177 | if (keyboardView)
178 | {
179 | return keyboardView;
180 | }
181 | }
182 | return nil;
183 | }
184 |
185 | - (UIView *)findKeyboardInView:(UIView *)view
186 | {
187 | for (UIView *sudView in [view subviews])
188 | {
189 |
190 | if (strstr(object_getClassName(sudView), "UIKeyboard")) {
191 | return sudView;
192 | }
193 | else
194 | {
195 | UIView *tempView = [self findKeyboardInView:sudView];
196 | if (tempView)
197 | {
198 | return tempView;
199 | }
200 | }
201 | }
202 |
203 | return nil;
204 | }
205 |
206 | + (void)removeCustomKeyBoardView{
207 |
208 | YBCustomBoard *keyBoardView = [YBCustomBoard sharedCustomKeyBoardView];
209 | keyBoardView.delegate = nil;
210 |
211 | for (UIView *object in keyBoardView.subviews) {
212 |
213 | [object removeFromSuperview];
214 | }
215 | [keyBoardView removeFromSuperview];
216 | }
217 |
218 | #pragma mark --- Delegate
219 | - (void)addNumbersWithMessage:(NSString *)message{
220 |
221 | YBCustomBoard *customKeyBoard = [YBCustomBoard sharedCustomKeyBoardView];
222 |
223 | if (customKeyBoard.delegate && [customKeyBoard.delegate respondsToSelector:@selector(addNumbersWithMessage:)]) {
224 |
225 | [customKeyBoard.delegate addNumbersWithMessage:message];
226 | }
227 | }
228 |
229 | - (void)deleteFunction:(NSString *)message{
230 |
231 | YBCustomBoard *customKeyBoard = [YBCustomBoard sharedCustomKeyBoardView];
232 |
233 | if (customKeyBoard.delegate && [customKeyBoard.delegate respondsToSelector:@selector(deleteFunction:)]) {
234 |
235 | [customKeyBoard.delegate deleteFunction:message];
236 | }
237 |
238 | }
239 |
240 | //十六进制色值转换
241 | + (nullable UIColor *) colorFromHexRGB:(nullable NSString *) inColorString
242 | {
243 | UIColor *result = nil;
244 | unsigned int colorCode = 0;
245 | unsigned char redByte, greenByte, blueByte;
246 | if (nil != inColorString)
247 | {
248 | NSScanner *scanner = [NSScanner scannerWithString:inColorString];
249 | (void) [scanner scanHexInt:&colorCode];
250 | }
251 | redByte = (unsigned char) (colorCode >> 16);
252 | greenByte = (unsigned char) (colorCode >> 8);
253 | blueByte = (unsigned char) (colorCode);
254 | result = [UIColor
255 | colorWithRed: (float)redByte / 0xff
256 | green: (float)greenByte/ 0xff
257 | blue: (float)blueByte / 0xff
258 | alpha:1.0];
259 | return result;
260 | }
261 |
262 | //色值转图片
263 | + (nullable UIImage *)imageWithColor:(nullable UIColor *)color size:(CGSize)size
264 | {
265 | CGRect rect = CGRectMake(0, 0, size.width, size.height);
266 | UIGraphicsBeginImageContext(rect.size);
267 | CGContextRef context = UIGraphicsGetCurrentContext();
268 | CGContextSetFillColorWithColor(context,color.CGColor);
269 | CGContextFillRect(context, rect);
270 | UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
271 | UIGraphicsEndImageContext();
272 | return img;
273 | }
274 |
275 |
276 | @end
277 |
--------------------------------------------------------------------------------
/YBCustomKeyBoard.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 250E653E1EAC887900E2DD58 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 250E653D1EAC887900E2DD58 /* main.m */; };
11 | 250E65411EAC887900E2DD58 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 250E65401EAC887900E2DD58 /* AppDelegate.m */; };
12 | 250E65441EAC887900E2DD58 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 250E65431EAC887900E2DD58 /* ViewController.m */; };
13 | 250E65471EAC887900E2DD58 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 250E65451EAC887900E2DD58 /* Main.storyboard */; };
14 | 250E65491EAC887900E2DD58 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 250E65481EAC887900E2DD58 /* Assets.xcassets */; };
15 | 250E654C1EAC887900E2DD58 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 250E654A1EAC887900E2DD58 /* LaunchScreen.storyboard */; };
16 | 250E65571EAC887900E2DD58 /* YBCustomKeyBoardTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 250E65561EAC887900E2DD58 /* YBCustomKeyBoardTests.m */; };
17 | 250E65641EAC88FA00E2DD58 /* YBCustomBoard.m in Sources */ = {isa = PBXBuildFile; fileRef = 250E65631EAC88FA00E2DD58 /* YBCustomBoard.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 250E65531EAC887900E2DD58 /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 250E65311EAC887900E2DD58 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 250E65381EAC887900E2DD58;
26 | remoteInfo = YBCustomKeyBoard;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | 250E65391EAC887900E2DD58 /* YBCustomKeyBoard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YBCustomKeyBoard.app; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 250E653D1EAC887900E2DD58 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
33 | 250E653F1EAC887900E2DD58 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
34 | 250E65401EAC887900E2DD58 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
35 | 250E65421EAC887900E2DD58 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
36 | 250E65431EAC887900E2DD58 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
37 | 250E65461EAC887900E2DD58 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
38 | 250E65481EAC887900E2DD58 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
39 | 250E654B1EAC887900E2DD58 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
40 | 250E654D1EAC887900E2DD58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
41 | 250E65521EAC887900E2DD58 /* YBCustomKeyBoardTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YBCustomKeyBoardTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 250E65561EAC887900E2DD58 /* YBCustomKeyBoardTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YBCustomKeyBoardTests.m; sourceTree = ""; };
43 | 250E65581EAC887900E2DD58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
44 | 250E65621EAC88FA00E2DD58 /* YBCustomBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YBCustomBoard.h; sourceTree = ""; };
45 | 250E65631EAC88FA00E2DD58 /* YBCustomBoard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YBCustomBoard.m; sourceTree = ""; };
46 | /* End PBXFileReference section */
47 |
48 | /* Begin PBXFrameworksBuildPhase section */
49 | 250E65361EAC887900E2DD58 /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | );
54 | runOnlyForDeploymentPostprocessing = 0;
55 | };
56 | 250E654F1EAC887900E2DD58 /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | /* End PBXFrameworksBuildPhase section */
64 |
65 | /* Begin PBXGroup section */
66 | 250E65301EAC887900E2DD58 = {
67 | isa = PBXGroup;
68 | children = (
69 | 250E653B1EAC887900E2DD58 /* YBCustomKeyBoard */,
70 | 250E65551EAC887900E2DD58 /* YBCustomKeyBoardTests */,
71 | 250E653A1EAC887900E2DD58 /* Products */,
72 | );
73 | sourceTree = "";
74 | };
75 | 250E653A1EAC887900E2DD58 /* Products */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 250E65391EAC887900E2DD58 /* YBCustomKeyBoard.app */,
79 | 250E65521EAC887900E2DD58 /* YBCustomKeyBoardTests.xctest */,
80 | );
81 | name = Products;
82 | sourceTree = "";
83 | };
84 | 250E653B1EAC887900E2DD58 /* YBCustomKeyBoard */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 250E65611EAC88AE00E2DD58 /* YBKeyBoard */,
88 | 250E653F1EAC887900E2DD58 /* AppDelegate.h */,
89 | 250E65401EAC887900E2DD58 /* AppDelegate.m */,
90 | 250E65421EAC887900E2DD58 /* ViewController.h */,
91 | 250E65431EAC887900E2DD58 /* ViewController.m */,
92 | 250E65451EAC887900E2DD58 /* Main.storyboard */,
93 | 250E65481EAC887900E2DD58 /* Assets.xcassets */,
94 | 250E654A1EAC887900E2DD58 /* LaunchScreen.storyboard */,
95 | 250E654D1EAC887900E2DD58 /* Info.plist */,
96 | 250E653C1EAC887900E2DD58 /* Supporting Files */,
97 | );
98 | path = YBCustomKeyBoard;
99 | sourceTree = "";
100 | };
101 | 250E653C1EAC887900E2DD58 /* Supporting Files */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 250E653D1EAC887900E2DD58 /* main.m */,
105 | );
106 | name = "Supporting Files";
107 | sourceTree = "";
108 | };
109 | 250E65551EAC887900E2DD58 /* YBCustomKeyBoardTests */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 250E65561EAC887900E2DD58 /* YBCustomKeyBoardTests.m */,
113 | 250E65581EAC887900E2DD58 /* Info.plist */,
114 | );
115 | path = YBCustomKeyBoardTests;
116 | sourceTree = "";
117 | };
118 | 250E65611EAC88AE00E2DD58 /* YBKeyBoard */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 250E65621EAC88FA00E2DD58 /* YBCustomBoard.h */,
122 | 250E65631EAC88FA00E2DD58 /* YBCustomBoard.m */,
123 | );
124 | name = YBKeyBoard;
125 | sourceTree = "";
126 | };
127 | /* End PBXGroup section */
128 |
129 | /* Begin PBXNativeTarget section */
130 | 250E65381EAC887900E2DD58 /* YBCustomKeyBoard */ = {
131 | isa = PBXNativeTarget;
132 | buildConfigurationList = 250E655B1EAC887900E2DD58 /* Build configuration list for PBXNativeTarget "YBCustomKeyBoard" */;
133 | buildPhases = (
134 | 250E65351EAC887900E2DD58 /* Sources */,
135 | 250E65361EAC887900E2DD58 /* Frameworks */,
136 | 250E65371EAC887900E2DD58 /* Resources */,
137 | );
138 | buildRules = (
139 | );
140 | dependencies = (
141 | );
142 | name = YBCustomKeyBoard;
143 | productName = YBCustomKeyBoard;
144 | productReference = 250E65391EAC887900E2DD58 /* YBCustomKeyBoard.app */;
145 | productType = "com.apple.product-type.application";
146 | };
147 | 250E65511EAC887900E2DD58 /* YBCustomKeyBoardTests */ = {
148 | isa = PBXNativeTarget;
149 | buildConfigurationList = 250E655E1EAC887900E2DD58 /* Build configuration list for PBXNativeTarget "YBCustomKeyBoardTests" */;
150 | buildPhases = (
151 | 250E654E1EAC887900E2DD58 /* Sources */,
152 | 250E654F1EAC887900E2DD58 /* Frameworks */,
153 | 250E65501EAC887900E2DD58 /* Resources */,
154 | );
155 | buildRules = (
156 | );
157 | dependencies = (
158 | 250E65541EAC887900E2DD58 /* PBXTargetDependency */,
159 | );
160 | name = YBCustomKeyBoardTests;
161 | productName = YBCustomKeyBoardTests;
162 | productReference = 250E65521EAC887900E2DD58 /* YBCustomKeyBoardTests.xctest */;
163 | productType = "com.apple.product-type.bundle.unit-test";
164 | };
165 | /* End PBXNativeTarget section */
166 |
167 | /* Begin PBXProject section */
168 | 250E65311EAC887900E2DD58 /* Project object */ = {
169 | isa = PBXProject;
170 | attributes = {
171 | LastUpgradeCheck = 0830;
172 | ORGANIZATIONNAME = YBKit;
173 | TargetAttributes = {
174 | 250E65381EAC887900E2DD58 = {
175 | CreatedOnToolsVersion = 8.3;
176 | ProvisioningStyle = Manual;
177 | };
178 | 250E65511EAC887900E2DD58 = {
179 | CreatedOnToolsVersion = 8.3;
180 | DevelopmentTeam = H427A3U972;
181 | ProvisioningStyle = Automatic;
182 | TestTargetID = 250E65381EAC887900E2DD58;
183 | };
184 | };
185 | };
186 | buildConfigurationList = 250E65341EAC887900E2DD58 /* Build configuration list for PBXProject "YBCustomKeyBoard" */;
187 | compatibilityVersion = "Xcode 3.2";
188 | developmentRegion = English;
189 | hasScannedForEncodings = 0;
190 | knownRegions = (
191 | en,
192 | Base,
193 | );
194 | mainGroup = 250E65301EAC887900E2DD58;
195 | productRefGroup = 250E653A1EAC887900E2DD58 /* Products */;
196 | projectDirPath = "";
197 | projectRoot = "";
198 | targets = (
199 | 250E65381EAC887900E2DD58 /* YBCustomKeyBoard */,
200 | 250E65511EAC887900E2DD58 /* YBCustomKeyBoardTests */,
201 | );
202 | };
203 | /* End PBXProject section */
204 |
205 | /* Begin PBXResourcesBuildPhase section */
206 | 250E65371EAC887900E2DD58 /* Resources */ = {
207 | isa = PBXResourcesBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | 250E654C1EAC887900E2DD58 /* LaunchScreen.storyboard in Resources */,
211 | 250E65491EAC887900E2DD58 /* Assets.xcassets in Resources */,
212 | 250E65471EAC887900E2DD58 /* Main.storyboard in Resources */,
213 | );
214 | runOnlyForDeploymentPostprocessing = 0;
215 | };
216 | 250E65501EAC887900E2DD58 /* Resources */ = {
217 | isa = PBXResourcesBuildPhase;
218 | buildActionMask = 2147483647;
219 | files = (
220 | );
221 | runOnlyForDeploymentPostprocessing = 0;
222 | };
223 | /* End PBXResourcesBuildPhase section */
224 |
225 | /* Begin PBXSourcesBuildPhase section */
226 | 250E65351EAC887900E2DD58 /* Sources */ = {
227 | isa = PBXSourcesBuildPhase;
228 | buildActionMask = 2147483647;
229 | files = (
230 | 250E65641EAC88FA00E2DD58 /* YBCustomBoard.m in Sources */,
231 | 250E65441EAC887900E2DD58 /* ViewController.m in Sources */,
232 | 250E65411EAC887900E2DD58 /* AppDelegate.m in Sources */,
233 | 250E653E1EAC887900E2DD58 /* main.m in Sources */,
234 | );
235 | runOnlyForDeploymentPostprocessing = 0;
236 | };
237 | 250E654E1EAC887900E2DD58 /* Sources */ = {
238 | isa = PBXSourcesBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | 250E65571EAC887900E2DD58 /* YBCustomKeyBoardTests.m in Sources */,
242 | );
243 | runOnlyForDeploymentPostprocessing = 0;
244 | };
245 | /* End PBXSourcesBuildPhase section */
246 |
247 | /* Begin PBXTargetDependency section */
248 | 250E65541EAC887900E2DD58 /* PBXTargetDependency */ = {
249 | isa = PBXTargetDependency;
250 | target = 250E65381EAC887900E2DD58 /* YBCustomKeyBoard */;
251 | targetProxy = 250E65531EAC887900E2DD58 /* PBXContainerItemProxy */;
252 | };
253 | /* End PBXTargetDependency section */
254 |
255 | /* Begin PBXVariantGroup section */
256 | 250E65451EAC887900E2DD58 /* Main.storyboard */ = {
257 | isa = PBXVariantGroup;
258 | children = (
259 | 250E65461EAC887900E2DD58 /* Base */,
260 | );
261 | name = Main.storyboard;
262 | sourceTree = "";
263 | };
264 | 250E654A1EAC887900E2DD58 /* LaunchScreen.storyboard */ = {
265 | isa = PBXVariantGroup;
266 | children = (
267 | 250E654B1EAC887900E2DD58 /* Base */,
268 | );
269 | name = LaunchScreen.storyboard;
270 | sourceTree = "";
271 | };
272 | /* End PBXVariantGroup section */
273 |
274 | /* Begin XCBuildConfiguration section */
275 | 250E65591EAC887900E2DD58 /* Debug */ = {
276 | isa = XCBuildConfiguration;
277 | buildSettings = {
278 | ALWAYS_SEARCH_USER_PATHS = NO;
279 | CLANG_ANALYZER_NONNULL = YES;
280 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
282 | CLANG_CXX_LIBRARY = "libc++";
283 | CLANG_ENABLE_MODULES = YES;
284 | CLANG_ENABLE_OBJC_ARC = YES;
285 | CLANG_WARN_BOOL_CONVERSION = YES;
286 | CLANG_WARN_CONSTANT_CONVERSION = YES;
287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
288 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
289 | CLANG_WARN_EMPTY_BODY = YES;
290 | CLANG_WARN_ENUM_CONVERSION = YES;
291 | CLANG_WARN_INFINITE_RECURSION = YES;
292 | CLANG_WARN_INT_CONVERSION = YES;
293 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
294 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
295 | CLANG_WARN_UNREACHABLE_CODE = YES;
296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
297 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
298 | COPY_PHASE_STRIP = NO;
299 | DEBUG_INFORMATION_FORMAT = dwarf;
300 | ENABLE_STRICT_OBJC_MSGSEND = YES;
301 | ENABLE_TESTABILITY = YES;
302 | GCC_C_LANGUAGE_STANDARD = gnu99;
303 | GCC_DYNAMIC_NO_PIC = NO;
304 | GCC_NO_COMMON_BLOCKS = YES;
305 | GCC_OPTIMIZATION_LEVEL = 0;
306 | GCC_PREPROCESSOR_DEFINITIONS = (
307 | "DEBUG=1",
308 | "$(inherited)",
309 | );
310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
311 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
312 | GCC_WARN_UNDECLARED_SELECTOR = YES;
313 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
314 | GCC_WARN_UNUSED_FUNCTION = YES;
315 | GCC_WARN_UNUSED_VARIABLE = YES;
316 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
317 | MTL_ENABLE_DEBUG_INFO = YES;
318 | ONLY_ACTIVE_ARCH = YES;
319 | SDKROOT = iphoneos;
320 | };
321 | name = Debug;
322 | };
323 | 250E655A1EAC887900E2DD58 /* Release */ = {
324 | isa = XCBuildConfiguration;
325 | buildSettings = {
326 | ALWAYS_SEARCH_USER_PATHS = NO;
327 | CLANG_ANALYZER_NONNULL = YES;
328 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
329 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
330 | CLANG_CXX_LIBRARY = "libc++";
331 | CLANG_ENABLE_MODULES = YES;
332 | CLANG_ENABLE_OBJC_ARC = YES;
333 | CLANG_WARN_BOOL_CONVERSION = YES;
334 | CLANG_WARN_CONSTANT_CONVERSION = YES;
335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
336 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
337 | CLANG_WARN_EMPTY_BODY = YES;
338 | CLANG_WARN_ENUM_CONVERSION = YES;
339 | CLANG_WARN_INFINITE_RECURSION = YES;
340 | CLANG_WARN_INT_CONVERSION = YES;
341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
342 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
343 | CLANG_WARN_UNREACHABLE_CODE = YES;
344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
346 | COPY_PHASE_STRIP = NO;
347 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
348 | ENABLE_NS_ASSERTIONS = NO;
349 | ENABLE_STRICT_OBJC_MSGSEND = YES;
350 | GCC_C_LANGUAGE_STANDARD = gnu99;
351 | GCC_NO_COMMON_BLOCKS = YES;
352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
354 | GCC_WARN_UNDECLARED_SELECTOR = YES;
355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
356 | GCC_WARN_UNUSED_FUNCTION = YES;
357 | GCC_WARN_UNUSED_VARIABLE = YES;
358 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
359 | MTL_ENABLE_DEBUG_INFO = NO;
360 | SDKROOT = iphoneos;
361 | VALIDATE_PRODUCT = YES;
362 | };
363 | name = Release;
364 | };
365 | 250E655C1EAC887900E2DD58 /* Debug */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
369 | DEVELOPMENT_TEAM = "";
370 | INFOPLIST_FILE = YBCustomKeyBoard/Info.plist;
371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
372 | PRODUCT_BUNDLE_IDENTIFIER = com.gyb.practice.YBCustomKeyBoard;
373 | PRODUCT_NAME = "$(TARGET_NAME)";
374 | PROVISIONING_PROFILE_SPECIFIER = "";
375 | };
376 | name = Debug;
377 | };
378 | 250E655D1EAC887900E2DD58 /* Release */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
382 | DEVELOPMENT_TEAM = "";
383 | INFOPLIST_FILE = YBCustomKeyBoard/Info.plist;
384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
385 | PRODUCT_BUNDLE_IDENTIFIER = com.gyb.practice.YBCustomKeyBoard;
386 | PRODUCT_NAME = "$(TARGET_NAME)";
387 | PROVISIONING_PROFILE_SPECIFIER = "";
388 | };
389 | name = Release;
390 | };
391 | 250E655F1EAC887900E2DD58 /* Debug */ = {
392 | isa = XCBuildConfiguration;
393 | buildSettings = {
394 | BUNDLE_LOADER = "$(TEST_HOST)";
395 | DEVELOPMENT_TEAM = H427A3U972;
396 | INFOPLIST_FILE = YBCustomKeyBoardTests/Info.plist;
397 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
398 | PRODUCT_BUNDLE_IDENTIFIER = com.gyb.practice.YBCustomKeyBoardTests;
399 | PRODUCT_NAME = "$(TARGET_NAME)";
400 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YBCustomKeyBoard.app/YBCustomKeyBoard";
401 | };
402 | name = Debug;
403 | };
404 | 250E65601EAC887900E2DD58 /* Release */ = {
405 | isa = XCBuildConfiguration;
406 | buildSettings = {
407 | BUNDLE_LOADER = "$(TEST_HOST)";
408 | DEVELOPMENT_TEAM = H427A3U972;
409 | INFOPLIST_FILE = YBCustomKeyBoardTests/Info.plist;
410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
411 | PRODUCT_BUNDLE_IDENTIFIER = com.gyb.practice.YBCustomKeyBoardTests;
412 | PRODUCT_NAME = "$(TARGET_NAME)";
413 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YBCustomKeyBoard.app/YBCustomKeyBoard";
414 | };
415 | name = Release;
416 | };
417 | /* End XCBuildConfiguration section */
418 |
419 | /* Begin XCConfigurationList section */
420 | 250E65341EAC887900E2DD58 /* Build configuration list for PBXProject "YBCustomKeyBoard" */ = {
421 | isa = XCConfigurationList;
422 | buildConfigurations = (
423 | 250E65591EAC887900E2DD58 /* Debug */,
424 | 250E655A1EAC887900E2DD58 /* Release */,
425 | );
426 | defaultConfigurationIsVisible = 0;
427 | defaultConfigurationName = Release;
428 | };
429 | 250E655B1EAC887900E2DD58 /* Build configuration list for PBXNativeTarget "YBCustomKeyBoard" */ = {
430 | isa = XCConfigurationList;
431 | buildConfigurations = (
432 | 250E655C1EAC887900E2DD58 /* Debug */,
433 | 250E655D1EAC887900E2DD58 /* Release */,
434 | );
435 | defaultConfigurationIsVisible = 0;
436 | };
437 | 250E655E1EAC887900E2DD58 /* Build configuration list for PBXNativeTarget "YBCustomKeyBoardTests" */ = {
438 | isa = XCConfigurationList;
439 | buildConfigurations = (
440 | 250E655F1EAC887900E2DD58 /* Debug */,
441 | 250E65601EAC887900E2DD58 /* Release */,
442 | );
443 | defaultConfigurationIsVisible = 0;
444 | };
445 | /* End XCConfigurationList section */
446 | };
447 | rootObject = 250E65311EAC887900E2DD58 /* Project object */;
448 | }
449 |
--------------------------------------------------------------------------------