修复bug
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
@property(nonatomic,strong) UILabel *gameNameView;
|
||||
///游戏局数
|
||||
@property(nonatomic,strong) UILabel *gameNumView;
|
||||
@property(nonatomic,strong) NIMMessage *msg;
|
||||
@end
|
||||
@implementation MessageContentGameView
|
||||
|
||||
@@ -89,6 +90,7 @@
|
||||
}
|
||||
|
||||
- (void)render:(NIMMessage *)message {
|
||||
self.msg = message;
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
AttachmentModel * attach = obj.attachment;
|
||||
UserGameInfoVo *gameInfo = [UserGameInfoVo modelWithDictionary:attach.data];
|
||||
@@ -97,11 +99,19 @@
|
||||
_gameNumView.text = [NSString stringWithFormat:@"%@ 局",gameInfo.inning];
|
||||
|
||||
|
||||
}
|
||||
-(void)checkGameAction{
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(checkGameListInfo:)]){
|
||||
[self.delegate checkGameListInfo:self.msg];
|
||||
}
|
||||
}
|
||||
- (NetImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [NetImageView new];
|
||||
_bgImageView.image = kImage(@"message_session_game_Invite_bg");
|
||||
_bgImageView.userInteractionEnabled = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(checkGameAction)];
|
||||
[_bgImageView addGestureRecognizer:tap];
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
@@ -131,6 +141,7 @@
|
||||
NetImageConfig *config = [[NetImageConfig alloc]init];
|
||||
config.placeHolder = [UIImageConstant defaultEmptyAvatarPlaceholder];
|
||||
_gameIcomView = [[NetImageView alloc]initWithConfig:config];
|
||||
_gameIcomView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _gameIcomView;
|
||||
}
|
||||
|
Reference in New Issue
Block a user