动态删除的通知view
This commit is contained in:
@@ -36,6 +36,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
|
||||
CustomMessageType_Update_RoomInfo = 20,
|
||||
///应用内分享
|
||||
CustomMessageType_Application_Share = 22,
|
||||
///系统通知,自定义布局消息(带确认、取消)
|
||||
CustomMessageType_Message_Handle = 23,
|
||||
///用户升级
|
||||
CustomMessageType_User_UpGrade = 24,
|
||||
///糖果树
|
||||
@@ -195,6 +197,13 @@ typedef NS_ENUM(NSInteger, CustomMessageSubApplicationShare) {
|
||||
Custom_Message_Sub_Application_Share_Room = 221,
|
||||
};
|
||||
|
||||
|
||||
///first = CustomMessageType_Applica
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubMessageHandle) {
|
||||
Custom_Message_Sub_Message_Handle_Content = 231, //文本
|
||||
Custom_Message_Sub_Message_Handle_Bussiness = 232, //业务
|
||||
};
|
||||
|
||||
///first = CustomMessageType_User_UpGrade
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubUserUpgrade) {
|
||||
///用户等级
|
||||
|
@@ -23,7 +23,7 @@
|
||||
@implementation MessageContentMonentsAutoView
|
||||
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message {
|
||||
return (CONTENT_PADDING_V_TOTAL + 144);
|
||||
return (CONTENT_PADDING_V_TOTAL + 120);
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
@@ -38,7 +38,7 @@
|
||||
- (void)initSubViewConstraints {
|
||||
[super initSubViewConstraints];
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(200, 144));
|
||||
make.size.mas_equalTo(CGSizeMake(250, 120));
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
@@ -260,7 +260,9 @@
|
||||
return @"MessageContentRiskAlertView";
|
||||
}else if(attachment.first == CustomMessageType_Monents && attachment.second == Custom_Message_Sub_Monents_Share) {
|
||||
return @"MessageContentMonentsView";
|
||||
}else if(attachment.first == CustomMessageType_Monents && attachment.second == Custom_Message_Sub_Monents_Approved) {
|
||||
}else if(attachment.first == CustomMessageType_Monents && (attachment.second == Custom_Message_Sub_Monents_Approved | attachment.second == Custom_Message_Sub_Monents_Ban_Delete)) {
|
||||
return @"MessageContentMonentsAutoView";
|
||||
} else if(attachment.first == CustomMessageType_Message_Handle && attachment.second == Custom_Message_Sub_Message_Handle_Content) {
|
||||
return @"MessageContentMonentsAutoView";
|
||||
}else {
|
||||
return @"MessageContentOpenLiveView";
|
||||
@@ -305,7 +307,9 @@
|
||||
return [MessageContentRiskAlertView measureHeight:message];
|
||||
} else if(attachment.first == CustomMessageType_Monents && attachment.second == Custom_Message_Sub_Monents_Share) {
|
||||
return [MessageContentMonentsView measureHeight:message];
|
||||
} else if(attachment.first == CustomMessageType_Monents && attachment.second == Custom_Message_Sub_Monents_Approved) {
|
||||
} else if(attachment.first == CustomMessageType_Monents && (attachment.second == Custom_Message_Sub_Monents_Approved | attachment.second == Custom_Message_Sub_Monents_Ban_Delete)) {
|
||||
return [MessageContentMonentsAutoView measureHeight:message];
|
||||
}else if(attachment.first == CustomMessageType_Message_Handle && attachment.second == Custom_Message_Sub_Message_Handle_Content) {
|
||||
return [MessageContentMonentsAutoView measureHeight:message];
|
||||
} else {
|
||||
return [MessageContentUnSupportView measureHeight:message];
|
||||
@@ -372,7 +376,12 @@
|
||||
return self.messageContent;
|
||||
}
|
||||
return [[MessageContentMonentsView alloc] init];
|
||||
}else if(attachment.first == CustomMessageType_Monents && attachment.second == Custom_Message_Sub_Monents_Approved) {
|
||||
}else if(attachment.first == CustomMessageType_Monents && (attachment.second == Custom_Message_Sub_Monents_Approved | attachment.second == Custom_Message_Sub_Monents_Ban_Delete)) {
|
||||
if ([self.messageContent isKindOfClass:[MessageContentMonentsAutoView class]]) {
|
||||
return self.messageContent;
|
||||
}
|
||||
return [[MessageContentMonentsAutoView alloc] init];
|
||||
}else if(attachment.first == CustomMessageType_Message_Handle && attachment.second == Custom_Message_Sub_Message_Handle_Content) {
|
||||
if ([self.messageContent isKindOfClass:[MessageContentMonentsAutoView class]]) {
|
||||
return self.messageContent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user