This commit is contained in:
2025-11-11 20:24:13 +08:00
parent 3440cc4773
commit 1d064c1f31
4 changed files with 91 additions and 15 deletions

View File

@@ -7,6 +7,7 @@
#import <Masonry/Masonry.h>
#import "UIColor+Extension.h"
#import "KBPersonInfoVC.h"
#import "KBMyKeyBoardVC.h"
@interface KBMyHeaderView ()
@property (nonatomic, strong) UILabel *titleLabel;
@@ -193,7 +194,10 @@
}
#pragma mark - Actions
- (void)onKeyboardTap { if (self.onKeyboardTapped) { self.onKeyboardTapped(); } }
- (void)onKeyboardTap {
KBMyKeyBoardVC *vc = [[KBMyKeyBoardVC alloc] init];
[KB_CURRENT_NAV pushViewController:vc animated:true];
}
- (void)onAvatarTap {
KBPersonInfoVC *vc = [[KBPersonInfoVC alloc] init];
[KB_CURRENT_NAV pushViewController:vc animated:true];

View File

@@ -2,12 +2,6 @@
// KBMyKeyboardCell.m
// keyBoard
//
// cell
// - Emoji
// -
// - /
// - +sizeForEmoji:title: 便 item
//
#import "KBMyKeyboardCell.h"
@@ -18,6 +12,7 @@
@property (nonatomic, strong) UILabel *titleLabel; //
@property (nonatomic, strong) UIView *minusBadge; //
@property (nonatomic, strong) UILabel *minusLabel; //
@property (nonatomic, strong) UIControl *minusTapArea; //
@end
@implementation KBMyKeyboardCell
@@ -65,7 +60,15 @@
make.center.equalTo(self.minusBadge);
}];
//
//
[self.contentView addSubview:self.minusTapArea];
[self.minusTapArea mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.contentView).offset(0);
make.right.equalTo(self.contentView).offset(0);
make.width.height.mas_equalTo(32); // 32x32
}];
// minusBadge
[self.minusTapArea addTarget:self action:@selector(didTapMinus) forControlEvents:UIControlEventTouchUpInside];
self.minusBadge.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapMinus)];
[self.minusBadge addGestureRecognizer:tap];
@@ -152,6 +155,16 @@
return _minusLabel;
}
- (UIControl *)minusTapArea {
if (!_minusTapArea) {
_minusTapArea = [[UIControl alloc] init];
_minusTapArea.backgroundColor = [UIColor clearColor];
// 使
_minusTapArea.accessibilityLabel = @"删除";
}
return _minusTapArea;
}
- (UIView *)coverView{
if (!_coverView) {
_coverView = [[UIView alloc] init];

View File

@@ -10,7 +10,6 @@
#import "KBSkinDetailVC.h"
#import "KBMyHeaderView.h" //
#import "KBMyListCell.h"
#import "KBMyKeyBoardVC.h"
@interface MyVC () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) BaseTableView *tableView; //
@@ -93,8 +92,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
KBMyKeyBoardVC *vc = [[KBMyKeyBoardVC alloc] init];
[self.navigationController pushViewController:vc animated:true];
}
#pragma mark - Lazy