1
This commit is contained in:
31
CustomKeyboard/View/KBKeyboardView.h
Normal file
31
CustomKeyboard/View/KBKeyboardView.h
Normal 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
|
||||
Reference in New Issue
Block a user