• 大小: 424KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-17
  • 语言: 其他
  • 标签: 其他  

资源简介

修复了之前滑动不同步的bug

资源截图

代码片段和文件信息

// AFHTTPSessionManager.m
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
//
// Permission is hereby granted free of charge to any person obtaining a copy
// of this software and associated documentation files (the “Software“) to deal
// in the Software without restriction including without limitation the rights
// to use copy modify merge publish distribute sublicense and/or sell
// copies of the Software and to permit persons to whom the Software is
// furnished to do so subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
// IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
// LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import “AFHTTPSessionManager.h“

#import “AFURLRequestSerialization.h“
#import “AFURLResponseSerialization.h“

#import 
#import 
#import 

#import 
#import 
#import 
#import 
#import 

#if TARGET_OS_IOS || TARGET_OS_TV
#import 
#elif TARGET_OS_WATCH
#import 
#endif

@interface AFHTTPSessionManager ()
@property (readwrite nonatomic strong) NSURL *baseURL;
@end

@implementation AFHTTPSessionManager
@dynamic responseSerializer;

+ (instancetype)manager {
    return [[[self class] alloc] initWithbaseURL:nil];
}

- (instancetype)init {
    return [self initWithbaseURL:nil];
}

- (instancetype)initWithbaseURL:(NSURL *)url {
    return [self initWithbaseURL:url sessionConfiguration:nil];
}

- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
    return [self initWithbaseURL:nil sessionConfiguration:configuration];
}

- (instancetype)initWithbaseURL:(NSURL *)url
           sessionConfiguration:(NSURLSessionConfiguration *)configuration
{
    self = [super initWithSessionConfiguration:configuration];
    if (!self) {
        return nil;
    }

    // Ensure terminal slash for baseURL path so that NSURL +URLWithString:relativeToURL: works as expected
    if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@“/“]) {
        url = [url URLByAppendingPathComponent:@““];
    }

    self.baseURL = url;

    self.requestSerializer = [AFHTTPRequestSerializer serializer];
    self.responseSerializer = [AFJSONResponseSerializer serializer];

    return self;
}

#pragma mark -

- (void)setRequestSerializer:(AFHTTPRequestSerializer  *)requestSerializer {
    NSParameterAs

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-09-23 13:54  Test\
     文件        6148  2016-09-24 09:52  Test\.DS_Store
     目录           0  2016-11-12 09:06  __MACOSX\
     目录           0  2016-11-12 09:06  __MACOSX\Test\
     文件         120  2016-09-24 09:52  __MACOSX\Test\._.DS_Store
     目录           0  2016-11-12 09:04  Test\.git\
     文件          15  2016-09-23 11:32  Test\.git\COMMIT_EDITMSG
     文件         144  2016-09-23 11:32  Test\.git\config
     文件          73  2016-09-23 11:32  Test\.git\description
     文件          23  2016-09-23 11:32  Test\.git\HEAD
     目录           0  2016-09-23 11:32  Test\.git\hooks\
     文件         177  2016-09-23 11:32  Test\.git\hooks\README.sample
     文件        3073  2016-09-26 10:19  Test\.git\index
     目录           0  2016-09-23 11:32  Test\.git\info\
     文件          40  2016-09-23 11:32  Test\.git\info\exclude
     目录           0  2016-11-12 09:06  __MACOSX\Test\.git\
     目录           0  2016-11-12 09:06  __MACOSX\Test\.git\info\
     文件         171  2016-09-23 11:32  __MACOSX\Test\.git\info\._exclude
     目录           0  2016-09-23 11:32  Test\.git\logs\
     文件         171  2016-09-23 11:32  Test\.git\logs\HEAD
     目录           0  2016-09-23 11:32  Test\.git\logs\refs\
     目录           0  2016-09-23 11:32  Test\.git\logs\refs\heads\
     文件         171  2016-09-23 11:32  Test\.git\logs\refs\heads\master
     目录           0  2016-09-26 10:19  Test\.git\objects\
     目录           0  2016-09-26 10:19  Test\.git\objects\0c\
     文件         196  2016-09-26 10:19  Test\.git\objects\0c\6707cd570dae213cd94077ff1791c7745d9a94
     目录           0  2016-09-23 11:32  Test\.git\objects\10\
     文件        3518  2016-09-23 11:32  Test\.git\objects\10\0b1e074e6074a37e0815112c4acff807905732
     目录           0  2016-09-23 11:32  Test\.git\objects\11\
     文件         161  2016-09-23 11:32  Test\.git\objects\11\8c98f7461bf98b2bc7e061150d8021121ad277
     目录           0  2016-09-23 13:35  Test\.git\objects\13\
............此处省略344个文件信息

评论

共有 条评论