//联系人:石虎QQ:1224614774昵称:嗡嘛呢叭咪哄
一、概念
//1.接手一个新项目,快速的调试,查看某个模块或者方法的作用,需要注释掉一个方法,或者某个代码块,直接写return;而不是全选,注释掉;
二、代码示例
//比如:查看这个方法loadRecommendTags作用
- (void)loadRecommendTags
{
return;//这样就会直接快速调试了.
[SVProgressHUD show];
//取消之前的任务
[self.manager.tasks makeObjectsPerformSelector:@selector(cancel)];
NSMutableDictionary *params = [NSMutableDictionary dictionary];
params[@"ab"] =@"tag_recommend";
params[@"cb"] =@"topic";
params[@"action"] =@"sub";
[self.manager GET:DXCommonUrlPath parameters:params success:^(NSURLSessionDataTask *_Nonnulltask,id_NonnullresponseObject) {
self.recommendTag = [SHRecommendTag mj_objectArrayWithKeyValuesArray:responseObject];
[self.tableView reloadData];
[SVProgressHUD dismiss];
} failure:^(NSURLSessionDataTask *_Nullabletask, NSError *_Nonnullerror) {
SHLog(@"error == %@",error);
[SVProgressHUD dismiss];
}];
}
网友评论