Commit b4485a03d8fd862165a6d7a1a8505ab793e13688

Authored by daojian
1 parent 8297f933

0.2.1版本 商家版未知消息防控

CNLiveNewIMAManagerKit.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveNewIMAManagerKit'
11   - s.version = '0.2.0'
  11 + s.version = '0.2.1'
12 12 s.summary = 'A short description of CNLiveNewIMAManagerKit.'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveNewIMAManagerKit/Classes/TIMCategory/IMAMsg+UITableViewCell.m
... ... @@ -132,9 +132,13 @@ static NSString *const kIMAMsgShowChatAttributedText = @"kIMAMsgShowChatAttribut
132 132 }
133 133  
134 134 if (cell == nil) {
135   - DebugLog(@"不支持该类型的Cell,请检查代码逻辑");
136   - NSException *e = [NSException exceptionWithName:@"不支持该类型的Cell" reason:@"不支持该类型的Cell" userInfo:nil];
137   - @throw e;
  135 + //给个未知消息占位显示
  136 + cell = [tableView dequeueReusableCellWithIdentifier:@"CNUnknownMsgCell"];
  137 + if (cell == nil) {
  138 + cell = [[[NSClassFromString(@"CNUnknownMsgCell") class] alloc] initWithC2CReuseIdentifier:@"CNUnknownMsgCell"];
  139 +
  140 + }
  141 + [cell performSelector:@selector(configWith:) withObject:self];
138 142 }
139 143  
140 144 return cell;
... ...