dispatch_sync(dispatch_get_main_queue(), ^{
[SVProgressHUD showSuccessWithStatus:@"识别成功!"];
[weakSelf.searchBar becomeFirstResponder];
_searchBar.text=carNumberString;
weakSelf.searchBar.showsCancelButton=YES;
for(id cc in [weakSelf.searchBar.subviews[0] subviews]){
if([cc isKindOfClass:[UIButton class]]){
UIButton *btn = (UIButton *)cc;
[btn setTitle:@"撤销" forState:UIControlStateNormal];
[btn setTitleColor:[UIColor colorWithHexString:@"2b96ed"] forState:UIControlStateNormal];
}
}
weakSelf.searchTableView.hidden=NO;
NSLog(@"%@",_InZT);
});
UI要确保在主线程刷新 否则会出现延迟或报错
在指纹识别的时候不在主线程更新UI不会崩溃 但响应很慢