IOS enum(枚举)使用

 

 

typedef enum {

    MJMessageTypeMe=0,
    MJMessageTypeOther
}MJMessageType;
/**
 *信息的类型
 *
 */
@property (nonatomic ,assign)MJMessageType type;

调用enum

 if(message.type==MJMessageTypeOther)
    {
        textX=CGRectGetMaxX(_iconF)+padding;
    }else{
        textX=iconX-padding-textBtnSize.width;
    }

 

posted on 2017-02-28 15:18  守望星空  阅读(140)  评论(0编辑  收藏  举报

导航