Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Suzhibin committed Mar 14, 2017
1 parent 0f95e67 commit 2374e31
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions ZBNetworking/ZBCacheManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,6 @@ - (void)clearCache{
- (void)clearCacheOnCompletion:(ZBCacheCompletedBlock)completion{

dispatch_async(self.operationQueue, ^{

//[self clearDiskWithpath:self.diskCachePath];
[[NSFileManager defaultManager] removeItemAtPath:self.diskCachePath error:nil];
[self createDirectoryAtPath:self.diskCachePath];
if (completion) {
Expand Down
Binary file not shown.
7 changes: 4 additions & 3 deletions ZBNetworkingDemo/SecondViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ - (void)getAFNetworkWithApiType:(apiType)requestType{
}
}];
}
#pragma mark -sessionblock
#pragma mark -ZBURLSessionManager block
//apiType 是请求类型 在ZBURLRequest 里
- (void)getSessionBlockWithApiType:(apiType)requestType{
//注意 ZBURLSessionManager 是 单例
Expand All @@ -105,10 +105,11 @@ - (void)getSessionBlockWithApiType:(apiType)requestType{
//如果是刷新的数据
if (type==ZBRequestTypeRefresh) {
[self.dataArray removeAllObjects];
[_refreshControl endRefreshing]; //结束刷新
[_refreshControl endRefreshing]; //下拉结束刷新
}
//如果是上拉加载
if (type==ZBRequestTypeLoadMore) {
//上拉加载
// 上拉结束刷新
}

NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil];
Expand Down
1 change: 0 additions & 1 deletion ZBNetworkingDemo/SettingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ - (void)reloadJsonNumber{

}

#pragma mark - AFNetworking
- (void)requestOffline:(NSMutableArray *)offlineArray{

//[ZBURLSessionManager sharedManager]requestWithConfig
Expand Down

0 comments on commit 2374e31

Please sign in to comment.