风险提示文案不能点击的问题
This commit is contained in:
@@ -48,12 +48,13 @@
|
|||||||
|
|
||||||
- (void)initSubViews {
|
- (void)initSubViews {
|
||||||
[super initSubViews];
|
[super initSubViews];
|
||||||
// self.backView.backgroundColor = [ThemeColor colorWithHexString:@"#e8e8e8"];
|
|
||||||
// self.backView.layer.masksToBounds = YES;
|
|
||||||
// self.backView.layer.cornerRadius = 10;
|
|
||||||
[self.backView addSubview:self.contentLabel];
|
[self.backView addSubview:self.contentLabel];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)tapRecognize {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
- (void)initSubViewConstraints {
|
- (void)initSubViewConstraints {
|
||||||
[super initSubViewConstraints];
|
[super initSubViewConstraints];
|
||||||
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -74,14 +75,14 @@
|
|||||||
NSRange range = [text rangeOfString:@"《整治网络直播乱象》"];
|
NSRange range = [text rangeOfString:@"《整治网络直播乱象》"];
|
||||||
if ((range.location + range.length) <= text.length) {
|
if ((range.location + range.length) <= text.length) {
|
||||||
[attribute addAttribute:NSForegroundColorAttributeName value:[ThemeColor appEmphasizeColor] range:range];
|
[attribute addAttribute:NSForegroundColorAttributeName value:[ThemeColor appEmphasizeColor] range:range];
|
||||||
|
[attribute yy_setTextHighlightRange:range color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||||
|
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||||
|
webVC.url = URLWithType(kNetworkRenovateURL);
|
||||||
|
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
[attribute yy_setTextHighlightRange:NSMakeRange(0, attribute.length) color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
|
||||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
|
||||||
webVC.url = URLWithType(kNetworkRenovateURL);
|
|
||||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
|
||||||
}];
|
|
||||||
self.contentLabel.attributedText = attribute;
|
self.contentLabel.attributedText = attribute;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -92,6 +93,8 @@
|
|||||||
_contentLabel.preferredMaxLayoutWidth = CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2;
|
_contentLabel.preferredMaxLayoutWidth = CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2;
|
||||||
_contentLabel.textColor = ThemeColor.mainTextColor;
|
_contentLabel.textColor = ThemeColor.mainTextColor;
|
||||||
_contentLabel.numberOfLines = 0;
|
_contentLabel.numberOfLines = 0;
|
||||||
|
// UITapGestureRecognizer * tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognize)];
|
||||||
|
// [_contentLabel addGestureRecognizer:tapGesture];
|
||||||
}
|
}
|
||||||
return _contentLabel;
|
return _contentLabel;
|
||||||
}
|
}
|
||||||
|
@@ -64,7 +64,6 @@
|
|||||||
if (!messageText || (message.messageType != NIMMessageTypeTip && message.messageType != NIMMessageTypeText)) {
|
if (!messageText || (message.messageType != NIMMessageTypeTip && message.messageType != NIMMessageTypeText)) {
|
||||||
messageText = @"未知消息类型";
|
messageText = @"未知消息类型";
|
||||||
}
|
}
|
||||||
NSDictionary * dic = message.yidunAntiSpamRes.toJSONObject;
|
|
||||||
_messageText.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[MessageContentText messageTextAttibutes]];
|
_messageText.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[MessageContentText messageTextAttibutes]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -354,6 +354,7 @@
|
|||||||
[self.toolbarView foldMenuView];
|
[self.toolbarView foldMenuView];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - NIMChatManagerDelegate
|
#pragma mark - NIMChatManagerDelegate
|
||||||
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
|
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
|
||||||
NIMMessage *message = messages.firstObject;
|
NIMMessage *message = messages.firstObject;
|
||||||
@@ -387,6 +388,7 @@
|
|||||||
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
||||||
NSDictionary * dic = @{@"suggestion": @"2"};
|
NSDictionary * dic = @{@"suggestion": @"2"};
|
||||||
message.localExt = dic;
|
message.localExt = dic;
|
||||||
|
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[self.sessionTableView reloadData];
|
[self.sessionTableView reloadData];
|
||||||
@@ -577,8 +579,8 @@
|
|||||||
_sessionTableView.backgroundColor = UIColor.clearColor;
|
_sessionTableView.backgroundColor = UIColor.clearColor;
|
||||||
_sessionTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
_sessionTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||||
_sessionTableView.showsVerticalScrollIndicator = NO;
|
_sessionTableView.showsVerticalScrollIndicator = NO;
|
||||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeKeyBoard)];
|
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeKeyBoard)];
|
||||||
[_sessionTableView addGestureRecognizer:tap];
|
// [_sessionTableView addGestureRecognizer:tap];
|
||||||
}
|
}
|
||||||
return _sessionTableView;
|
return _sessionTableView;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user