QQ聊天cell-15-05-16

storyboard/xib 中不能再imageview中添加控件,而代码可以

typedef enum {
    MJMessageTypeMe = 0, // 自己发的    (默认为0)
    MJMessageTypeOther   // 别人发的     (默认递增)
} MJMessageType;

在类中定义枚举,要以类名开头。定义枚举,typedef enum

@property (nonatomic,weak) UIImageView *iconView;

self.iconView = [[UIImageView alloc] init];

这样是错的,当一个弱指针指向一个创建对象时,该对象会立即被销毁!

原文地址:https://www.cnblogs.com/tusiji7/p/4508838.html