iOS-規範-頭文件結構

1.頭文件atom

#import <Foundation/Foundation.h>spa

2.宏定義.net

#define A a3d

3.枚舉/靜態變量等接口

typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {
    AFNetworkReachabilityStatusUnknown          = -1,
    AFNetworkReachabilityStatusNotReachable     = 0,
    AFNetworkReachabilityStatusReachableViaWWAN = 1,
    AFNetworkReachabilityStatusReachableViaWiFi = 2,get

};it

static dispatch_queue_t http_request_operation_processing_queue() {
    static dispatch_queue_t af_http_request_operation_processing_queue;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        af_http_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.http-request.processing", DISPATCH_QUEUE_CONCURRENT);
    });

    return af_http_request_operation_processing_queue;io

}class

4.接口import

@interface AFNetworkReachabilityManager : NSObject

(1)屬性

@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;

(2)方法

+ (instancetype)sharedManager;

相關文章
相關標籤/搜索