美文网首页
枚举 结构体 代码块 一种存储数据

枚举 结构体 代码块 一种存储数据

作者: CoderLHC | 来源:发表于2017-03-27 22:44 被阅读0次

    typedef enum {

    numberOne,

    numberTwo,

    numberThree

    } numberType

    typedef  NS_ENUM(NSInteger,NumberType ){

    numberOne,

    numberTwo,

    numberThree

    }

    typedef NS_OPTIONS(NSUInteger,NumberType){

    numberOne=0,

    numberTwo=1<<0

    numberThree=1<<1

    }

    typedef enum : NSInteger{

    numberOne,

    numberTwo,

    numberThree

    }numberType

    typedef void (^numberStatusBlock)(NumberType type); //传递一种数据结构

    typedef struct{

    numberType type,

    name

    }num

    相关文章

      网友评论

          本文标题:枚举 结构体 代码块 一种存储数据

          本文链接:https://www.haomeiwen.com/subject/zblvnttx.html