优化发送输入框
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
|
||||
|
||||
/// 右侧搜索按钮
|
||||
@property (nonatomic, strong) UIButton *searchButton;
|
||||
//@property (nonatomic, strong) UIButton *searchButton;
|
||||
|
||||
/// 标题数组
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
@@ -42,7 +42,7 @@
|
||||
[self setupUI];
|
||||
|
||||
/// 2:绑定事件
|
||||
[self bindActions];
|
||||
// [self bindActions];
|
||||
}
|
||||
|
||||
#pragma mark - 1:控件初始化
|
||||
@@ -69,12 +69,12 @@
|
||||
}];
|
||||
|
||||
// 添加搜索按钮
|
||||
[self.kb_navView addSubview:self.searchButton];
|
||||
[self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.kb_navView).offset(-16);
|
||||
make.centerY.equalTo(self.kb_backButton);
|
||||
make.width.height.mas_equalTo(24);
|
||||
}];
|
||||
// [self.kb_navView addSubview:self.searchButton];
|
||||
// [self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.right.equalTo(self.kb_navView).offset(-16);
|
||||
// make.centerY.equalTo(self.kb_backButton);
|
||||
// make.width.height.mas_equalTo(24);
|
||||
// }];
|
||||
|
||||
// 添加列表容器
|
||||
[self.view addSubview:self.listContainerView];
|
||||
@@ -94,9 +94,9 @@
|
||||
|
||||
#pragma mark - 2:绑定事件
|
||||
|
||||
- (void)bindActions {
|
||||
[self.searchButton addTarget:self action:@selector(searchButtonTapped) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
//- (void)bindActions {
|
||||
// [self.searchButton addTarget:self action:@selector(searchButtonTapped) forControlEvents:UIControlEventTouchUpInside];
|
||||
//}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
@@ -189,16 +189,16 @@
|
||||
return _listContainerView;
|
||||
}
|
||||
|
||||
- (UIButton *)searchButton {
|
||||
if (!_searchButton) {
|
||||
_searchButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
if (@available(iOS 13.0, *)) {
|
||||
UIImage *searchImage = [UIImage systemImageNamed:@"magnifyingglass"];
|
||||
[_searchButton setImage:searchImage forState:UIControlStateNormal];
|
||||
_searchButton.tintColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
}
|
||||
return _searchButton;
|
||||
}
|
||||
//- (UIButton *)searchButton {
|
||||
// if (!_searchButton) {
|
||||
// _searchButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
// if (@available(iOS 13.0, *)) {
|
||||
// UIImage *searchImage = [UIImage systemImageNamed:@"magnifyingglass"];
|
||||
// [_searchButton setImage:searchImage forState:UIControlStateNormal];
|
||||
// _searchButton.tintColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
// }
|
||||
// }
|
||||
// return _searchButton;
|
||||
//}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user