NSString *searchText = [self.searchTextField.textstringByTrimmingCharactersInSet:[NSCharacterSetwhitespaceAndNewlineCharacterSet]];
if (!searchText.length > 0) {
[selfshowAlertWithTitle:nilmessage:@"请输入搜索关键字!"];
}
本文共 264 字,大约阅读时间需要 1 分钟。
NSString *searchText = [self.searchTextField.textstringByTrimmingCharactersInSet:[NSCharacterSetwhitespaceAndNewlineCharacterSet]];
if (!searchText.length > 0) {
[selfshowAlertWithTitle:nilmessage:@"请输入搜索关键字!"];
}
转载于:https://www.cnblogs.com/guligei/p/3175268.html