Latest 0.1.4
Homepage https://github.com/zhouaaa/ZHCommonKit
License MIT
Platforms ios 9.0
Dependencies AFNetworking, Masonry, MJRefresh, MBProgressHUD, MJExtension, SDCycleScrollView, IQKeyboardManager, JXCategoryView
Authors

平常项目常用的kit

ZHNetClient

可在appDelegate中初始化

[NetClient initWithBasicURL:Basic_url
pageSize:1
pageKeywords:@"p"
pageSizeKeywords:@"num"
tokenHeadKeywords:@"Authorization"
deiviceClientKeywords:@"Device"];
//可添加各种请求头
AFHTTPRequestSerializer tempRequestSerializer = [NetClient sharedManager].requestSerializer;
NSString
uuid = [[UIDevice currentDevice].identifierForVendor.UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""];
[tempRequestSerializer setValue:uuid forHTTPHeaderField:@"UUID"];

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
[tempRequestSerializer setValue:app_Version forHTTPHeaderField:@"Version"];

[tempRequestSerializer setValue:[Prefence shared].Session_id forHTTPHeaderField:@"Session_id"];

[tempRequestSerializer setValue:@"iOS" forHTTPHeaderField:@"Device"];

eg:
[ZHNetClient initWithBasicURL:nil isOpenLog:YES];
ZHNetRequest *request = [[ZHNetRequest alloc] initWithRelativeURLString:@"https://www.apiopen.top/novelApi" success:^(id data) {

} fail:^(NSError *error) {

}];
[request postData];

Latest podspec

{
    "name": "ZHCommonKit",
    "version": "0.1.4",
    "summary": "u65e5u5e38u9879u76eeu5e38u7528u7684Kit[u6dfbu52a0u8d44u6e90u56feu7247]",
    "description": "u65e5u5e38u9879u76eeu5e38u7528u7684Kituff0cu7f51u7edcu5c01u88c5u5c42 Block delegate",
    "homepage": "https://github.com/zhouaaa/ZHCommonKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "json_zhou": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/zhouaaa/ZHCommonKit.git",
        "tag": "0.1.4"
    },
    "source_files": [
        "ZHCommonKit/ZHCommonKit/",
        "ZHCommonKit/ZHCommonKit/**/*.{h,m}"
    ],
    "resources": "ZHCommonKit/ZHCommonKit/ZHComm/ZHBackConfig.bundle",
    "dependencies": {
        "AFNetworking": [],
        "Masonry": [],
        "MJRefresh": [],
        "MBProgressHUD": [],
        "MJExtension": [],
        "SDCycleScrollView": [],
        "IQKeyboardManager": [],
        "JXCategoryView": []
    }
}

Pin It on Pinterest

Share This