【Swift】Swift调用OC中枚举值进行比较

OC中定义枚举

typedef NS_ENUM(NSInteger, RefreshType)

{

    EndRefresh,

    RefreshWithNoMoreData,

    EndRefreshWithError,

};


Swift中调用枚举值进行比较

 if type == RefreshType.endRefresh.rawValue{      

}

你可能感兴趣的:(【Swift】Swift调用OC中枚举值进行比较)