Latest 1.0.3
Homepage https://github.com/openerteam/HostManagerLibrary-IPhone
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

网络地址管理


安装方式

1.cocoapods:

pod 'HostMananger'

2.导入


使用说明

设置默认地址列表
导入头文件

#import <HostManagerHelper.h>
[[HostManagerHelper shareHeler] setDefalutAddress:^NSMutableArray<AddressModel *> *{

        NSMutableArray *array = @[].mutableCopy;
        {
            AddressModel *model = [[AddressModel alloc] initWithName:@"百度" ip:@"www.baidu.com" host:nil];//注意添加和代码设置前面不要http;获取的会帮你加上 因为ping的失手前面没有http
            model.isSelected = YES;// 默认地址,只能设置一个
            [array addObject:model];

        }
        return array;

    }];

获取默认置地址
1.直接使用宏定义

CURRENTADDRESS

2.获取

[[HostManagerHelper shareHeler] currentAddress];

Latest podspec

{
    "name": "HostManager",
    "version": "1.0.3",
    "summary": "u8fdeu63a5u5730u5740u7ba1u7406",
    "description": "u4e00u4e2au53efu4ee5u4feeu6539u7f51u7edcu8fdeu63a5u5730u5740u7684u5de5u5177u7c7b",
    "homepage": "https://github.com/openerteam/HostManagerLibrary-IPhone",
    "license": "MIT",
    "authors": {
        "North": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/openerteam/HostManagerLibrary-IPhone.git",
        "tag": "1.0.3"
    },
    "source_files": "HostManager/HostManager/*.{h,m}",
    "exclude_files": "Classes/Exclude",
    "resources": "HostManager/HostManager/resources/*.png",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This