This commit is contained in:
2026-02-03 17:00:42 +08:00
parent b9663037f5
commit 0bd0392191

View File

@@ -164,7 +164,7 @@
@property (nonatomic, strong) UIView *searchContainer; @property (nonatomic, strong) UIView *searchContainer;
@property (nonatomic, strong) UIImageView *searchIconView; @property (nonatomic, strong) UIImageView *searchIconView;
@property (nonatomic, strong) UITextField *searchField; @property (nonatomic, strong) UITextField *searchField;
@property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) BaseTableView *tableView;
@property (nonatomic, strong) NSArray<KBPersonaModel *> *personas; @property (nonatomic, strong) NSArray<KBPersonaModel *> *personas;
@property (nonatomic, strong) NSArray<KBPersonaModel *> *displayPersonas; @property (nonatomic, strong) NSArray<KBPersonaModel *> *displayPersonas;
@@ -203,7 +203,7 @@
}]; }];
[self.searchContainer mas_makeConstraints:^(MASConstraintMaker *make) { [self.searchContainer mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.contentView).offset(14); make.top.equalTo(self.contentView).offset(KB_STATUSBAR_HEIGHT + 20);
make.left.equalTo(self.contentView).offset(16); make.left.equalTo(self.contentView).offset(16);
make.right.equalTo(self.contentView).offset(-16); make.right.equalTo(self.contentView).offset(-16);
make.height.mas_equalTo(36); make.height.mas_equalTo(36);
@@ -396,14 +396,15 @@
_searchField.textColor = [UIColor whiteColor]; _searchField.textColor = [UIColor whiteColor];
_searchField.font = [UIFont systemFontOfSize:14]; _searchField.font = [UIFont systemFontOfSize:14];
_searchField.clearButtonMode = UITextFieldViewModeWhileEditing; _searchField.clearButtonMode = UITextFieldViewModeWhileEditing;
_searchField.returnKeyType = UIReturnKeySearch;
[_searchField addTarget:self action:@selector(searchFieldChanged:) forControlEvents:UIControlEventEditingChanged]; [_searchField addTarget:self action:@selector(searchFieldChanged:) forControlEvents:UIControlEventEditingChanged];
} }
return _searchField; return _searchField;
} }
- (UITableView *)tableView { - (BaseTableView *)tableView {
if (!_tableView) { if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; _tableView = [[BaseTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.backgroundColor = [UIColor clearColor]; _tableView.backgroundColor = [UIColor clearColor];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.showsVerticalScrollIndicator = NO; _tableView.showsVerticalScrollIndicator = NO;