ios - Xcode Instruments Time Profiler分析结果
伊谢尔伦
伊谢尔伦 2017-04-17 17:54:05
[iOS讨论组]

问题是一个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];
    
}
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(1)
PHP中文网

目前没看出来,哪边有问题,可以从block循环引起的方面查查!

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号