Skip to content

Commit 5d9cb5a

Browse files
guangyaoguangyao
authored andcommitted
Fix 点击url不跳转的问题
1 parent d6b6b48 commit 5d9cb5a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUIMessageCollectionView.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,24 @@ open class IMUIMessageCollectionView: UIView {
8989

9090
self.messageCollectionView.isScrollEnabled = true
9191
NotificationCenter.default.addObserver(self, selector: #selector(clickStopPlayActivity(notification:)), name: NSNotification.Name(rawValue: "StopPlayActivity"), object: nil)
92+
NotificationCenter.default.addObserver(self, selector: #selector(clickLinkTouch), name: NSNotification.Name(rawValue: "ClickTouchLinkNotification"), object: nil)
9293
self.cellGesture.addTarget(self, action: #selector(self.tapCollectionView))
93-
// self.messageCollectionView.addGestureRecognizer(self.cellGesture)
94+
self.messageCollectionView.addGestureRecognizer(self.cellGesture)
9495
}
9596

9697
func tapCollectionView(){//点击整个cell,隐藏键盘
9798
self.delegate?.messageCollectionView?(tapCellView: "")
9899
}
100+
func clickLinkTouch(notifi: Notification){
101+
let strTouch: String = notifi.object as! String
102+
if strTouch == "begin" {
103+
self.messageCollectionView.removeGestureRecognizer(self.cellGesture)
104+
105+
}else{
106+
self.messageCollectionView.addGestureRecognizer(self.cellGesture)
107+
}
108+
}
109+
99110

100111
open subscript(index: Int) -> IMUIMessageModelProtocol {
101112
return chatDataManager[index]

0 commit comments

Comments
 (0)