36 lines
731 B
Objective-C
Executable File
36 lines
731 B
Objective-C
Executable File
//
|
|
// SPGonghuiSearchView.m
|
|
// SweetParty
|
|
//
|
|
// Created by bj_szd on 2023/1/14.
|
|
//
|
|
|
|
#import "SPGonghuiSearchView.h"
|
|
|
|
@interface SPGonghuiSearchView () <UITextFieldDelegate>
|
|
|
|
@end
|
|
|
|
@implementation SPGonghuiSearchView
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
|
|
self.searchTF.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"搜索公会名称/ID" attributes:@{NSForegroundColorAttributeName:HEXCOLORA(0x333333, 1)}];
|
|
|
|
self.searchTF.delegate = self;
|
|
}
|
|
|
|
- (IBAction)onSearch:(id)sender {
|
|
if (self.onSearchBlock) {
|
|
self.onSearchBlock(self.searchTF.text);
|
|
}
|
|
}
|
|
|
|
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
|
[self onSearch:nil];
|
|
return YES;
|
|
}
|
|
|
|
@end
|