diff --git a/CustomKeyboard/View/KBKeyButton.m b/CustomKeyboard/View/KBKeyButton.m index 2ef4771..01e9b47 100644 --- a/CustomKeyboard/View/KBKeyButton.m +++ b/CustomKeyboard/View/KBKeyButton.m @@ -47,8 +47,8 @@ [NSLayoutConstraint activateConstraints:@[ [iv.topAnchor constraintEqualToAnchor:self.topAnchor], [iv.bottomAnchor constraintEqualToAnchor:self.bottomAnchor], - [iv.leadingAnchor constraintEqualToAnchor:self.leadingAnchor], - [iv.trailingAnchor constraintEqualToAnchor:self.trailingAnchor], + [iv.leadingAnchor constraintEqualToAnchor:self.leadingAnchor constant:2], + [iv.trailingAnchor constraintEqualToAnchor:self.trailingAnchor constant:-2], ]]; self.iconView = iv; diff --git a/CustomKeyboard/View/KBKeyboardView.m b/CustomKeyboard/View/KBKeyboardView.m index 6029806..50dbedb 100644 --- a/CustomKeyboard/View/KBKeyboardView.m +++ b/CustomKeyboard/View/KBKeyboardView.m @@ -277,7 +277,7 @@ - (void)buildRow:(UIView *)row withKeys:(NSArray *)keys edgeSpacerMultiplier:(CGFloat)edgeSpacerMultiplier { CGFloat hInset = 6; // 行左右内边距 - CGFloat spacing = 6; // 键与键之间的间距 + CGFloat spacing = 0; // 键与键之间的间距 UIView *previous = nil; UIView *leftSpacer = nil; UIView *rightSpacer = nil;