资源简介
最适合iOS 初学者练手的项目,该项目已上线,并且持续更新。
代码片段和文件信息
// 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 2018-02-07 11:25 WallpaperTests\
文件 6148 2018-02-07 11:56 WallpaperTests\.DS_Store
目录 0 2018-02-07 11:25 Wallpaper.xcodeproj\
文件 106054 2018-02-07 11:42 Wallpaper.xcodeproj\project.pbxproj
目录 0 2018-01-08 17:27 Wallpaper.xcodeproj\xcuserdata\
目录 0 2018-01-08 17:27 Wallpaper.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\
目录 0 2018-02-07 13:30 Wallpaper.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcdebugger\
文件 2495 2018-02-07 13:30 Wallpaper.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcdebugger\Breakpoints_v2.xcbkptlist
目录 0 2018-02-01 14:03 Wallpaper.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\
文件 2350 2018-02-01 14:03 Wallpaper.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\ZOLWallWrapper.xcscheme
文件 576 2018-01-08 17:27 Wallpaper.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\xcschememanagement.plist
目录 0 2018-01-08 17:27 Wallpaper.xcodeproj\project.xcworkspace\
文件 159 2018-01-08 17:27 Wallpaper.xcodeproj\project.xcworkspace\contents.xcworkspacedata
目录 0 2018-01-08 17:27 Wallpaper.xcodeproj\project.xcworkspace\xcuserdata\
目录 0 2018-01-12 10:37 Wallpaper.xcodeproj\project.xcworkspace\xcuserdata\zhujinhui.xcuserdatad\
文件 55653 2018-01-12 10:37 Wallpaper.xcodeproj\project.xcworkspace\xcuserdata\zhujinhui.xcuserdatad\UserInterfaceState.xcuserstate
目录 0 2018-02-07 14:29 __MACOSX\
目录 0 2018-02-07 14:29 __MACOSX\Wallpaper.xcodeproj\
文件 176 2018-01-08 17:27 __MACOSX\Wallpaper.xcodeproj\._project.xcworkspace
文件 208 2018-02-07 11:25 __MACOSX\._Wallpaper.xcodeproj
文件 1572 2018-02-07 14:04 README.md
文件 176 2018-02-07 14:04 __MACOSX\._README.md
目录 0 2018-02-07 12:01 Pods\
目录 0 2018-02-07 12:01 Pods\Pods.xcodeproj\
文件 113813 2018-02-07 12:01 Pods\Pods.xcodeproj\project.pbxproj
目录 0 2018-02-01 13:34 Pods\Pods.xcodeproj\xcuserdata\
目录 0 2018-02-07 11:42 Pods\Pods.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\
目录 0 2018-02-07 11:42 Pods\Pods.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\
文件 2087 2018-02-07 11:42 Pods\Pods.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\Masonry.xcscheme
文件 2097 2018-02-07 11:42 Pods\Pods.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\AFNetworking.xcscheme
文件 2087 2018-02-07 11:42 Pods\Pods.xcodeproj\xcuserdata\zhujinhui.xcuserdatad\xcschemes\Mangogo.xcscheme
............此处省略1162个文件信息
- 上一篇:GB28281之sip协议
- 下一篇:极验陈博-智能反爬虫试炼之路.pdf
相关资源
- cisco 2811 ios284806
- Cisco vios_l2-adventerprisek9-m.SSA.high_iron_
- Advanced_iOS_App_Architecture pdf + 源码
- Intel fit (flash image tool)工具
- 星空版千月影视APP源码无限代理版 支
- C3640的IOS
- cat4500e-entservicesk9-mz.122-54.SG1.bin
- Data_Structures_and_Algorithms_in_Swift_v3.0.0
- harfbuzz for iOS
- iOS13.4 Xcode真机支持文件
- iOS真机测试包13.7 DeviceSupport13.7
- 专注于非越狱环境下iOS应用逆向研究
- IOS iOS 13.4 (17E262)真机调试包
- c3560e-universalk9-mz.122-55.SE5.bin
- ios14.3镜像文件
- ipad1可用的老版QQ空间 ios5.1.1
- iOS13.5真机支持包
- iOS13.417E262真机包.zip
- Cisco 2811 IOS
- Location IOS13.4驱动版本,包含inject.dm
- iOS 13.5 真机调试包
-
ios music pla
yer lite - Push Notifications by Tutorials (Swift 4.2)
- IOS-音乐播放器
- c2800nm-adventerprisek9-mz.124-25.bin
- RxSwift - Reactive Programming with Swift (R
- Data Structures and Algorithms v2.0 (iOS12 &
- raywenderlich 的 Data Structures and Algorith
- iOS和macOS性能优化:Cocoa、Cocoa Touch、
- iOS 2D 游戏开发教程 2D_Apple_Games_by_Tu
评论
共有 条评论