OC中定义枚举
typedef NS_ENUM(NSInteger, RefreshType)
{
EndRefresh,
RefreshWithNoMoreData,
EndRefreshWithError,
};
Swift中调用枚举值进行比较
if type == RefreshType.endRefresh.rawValue{
}
OC中定义枚举
typedef NS_ENUM(NSInteger, RefreshType)
{
EndRefresh,
RefreshWithNoMoreData,
EndRefreshWithError,
};
Swift中调用枚举值进行比较
if type == RefreshType.endRefresh.rawValue{
}
本文标题:【Swift】Swift调用OC中枚举值进行比较
本文链接:https://www.haomeiwen.com/subject/hhqunhtx.html
网友评论