This commit is contained in:
2025-10-28 10:18:10 +08:00
parent efb04d134e
commit 1deca2ae5b
166 changed files with 17288 additions and 1427 deletions

View File

@@ -0,0 +1,31 @@
//
// KBKeyboardView.h
// CustomKeyboard
//
// 键盘主容器,内部管理按键行布局。
//
#import <UIKit/UIKit.h>
@class KBKeyboardView, KBKey;
typedef NS_ENUM(NSInteger, KBKeyboardLayoutStyle) {
KBKeyboardLayoutStyleLetters = 0,
KBKeyboardLayoutStyleNumbers
};
@protocol KBKeyboardViewDelegate <NSObject>
@optional
/// 键被点击的回调
- (void)keyboardView:(KBKeyboardView *)keyboard didTapKey:(KBKey *)key;
@end
@interface KBKeyboardView : UIView
@property (nonatomic, weak) id<KBKeyboardViewDelegate> delegate;
@property (nonatomic, assign) KBKeyboardLayoutStyle layoutStyle; // 布局样式(字母/数字)
@property (nonatomic, assign, getter=isShiftOn) BOOL shiftOn; // 大小写状态
- (void)reloadKeys; // 当布局样式/大小写变化时调用
@end