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;
    }
原文地址:https://www.cnblogs.com/liuwj/p/6479038.html