问题是一个UITextField在Cell中,结果通过block回调回UITableView,结果在iOS7上面就死在这一句,CPU使用率飙升到100%,这个是用time profiler分析结果,表示没看懂,求大神解答下。
[biddingCell changeTextFieldValue:^(NSInteger price, NSNumber *percentage) { if (biddingCell.biddingType ==BiddingTypeRent) { weakPropertyFollowAllAddEntity.RentPrice = price; weakPropertyFollowAllAddEntity.RentPer = percentage; weakPropModelEntity.rentPer = [NSString stringWithFormat:@"%@",percentage]; }else{ weakPropertyFollowAllAddEntity.SalePrice = price; weakPropertyFollowAllAddEntity.SalePer = percentage; weakPropModelEntity.salePer = [NSString stringWithFormat:@"%@",percentage]; } [weakSelf.tableView reloadData]; }]; -(void)textFieldDidEndEditing:(UITextField *)textField{ [self changeTextFieldContent]; if (_block) { _block(textField.text.integerValue,_percentage); } [textField resignFirstResponder]; }
目前没看出来,哪边有问题,可以从block循环引起的方面查查!