首页加载默认皮肤
This commit is contained in:
@@ -74,6 +74,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface KBKeyboardLayout : NSObject
|
||||
@property (nonatomic, strong, nullable) NSArray<KBKeyboardRowConfig *> *rows;
|
||||
@property (nonatomic, strong, nullable) NSArray<KBKeyboardRowConfig *> *shiftRows;
|
||||
@end
|
||||
|
||||
@interface KBKeyboardLayoutConfig : NSObject
|
||||
|
||||
@@ -82,7 +82,7 @@ static NSString * const kKBKeyboardLayoutI18nFileName = @"kb_keyboard_layouts_i1
|
||||
@implementation KBKeyboardLayout
|
||||
|
||||
+ (NSDictionary *)mj_objectClassInArray {
|
||||
return @{ @"rows": [KBKeyboardRowConfig class] };
|
||||
return @{ @"rows": [KBKeyboardRowConfig class], @"shiftRows": [KBKeyboardRowConfig class] };
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -127,7 +127,14 @@ static const CGFloat kKBLettersRow2EdgeSpacerMultiplier = 0.5;
|
||||
}
|
||||
|
||||
KBKeyboardLayout *layout = [self kb_currentLayout];
|
||||
NSArray<KBKeyboardRowConfig *> *rows = layout.rows ?: @[];
|
||||
NSArray<KBKeyboardRowConfig *> *rows = nil;
|
||||
|
||||
if (self.shiftOn && layout.shiftRows.count > 0) {
|
||||
rows = layout.shiftRows;
|
||||
} else {
|
||||
rows = layout.rows ?: @[];
|
||||
}
|
||||
|
||||
if (rows.count < 4) {
|
||||
[self kb_buildLegacyLayout];
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user