Skip to content

Commit 0a8c759

Browse files
guangyaoguangyao
authored andcommitted
优化收起键盘
1 parent a4dd7e2 commit 0a8c759

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUIBaseMessageCell.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ open class IMUIBaseMessageCell: UICollectionViewCell, IMUIMessageCellProtocal,Me
223223
}
224224

225225
func tapBubbleView() {
226+
UIApplication.shared.keyWindow?.endEditing(true)
226227
if self.message?.type == .text {
227-
self.delegate?.messageCollectionView?(tapCellView: "")
228+
// self.delegate?.messageCollectionView?(tapCellView: "")
228229
}else if self.message?.type == .image {
229230
let strMsgID = (self.message?.msgId)! as NSString
230231
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "ShowOrigImageNotification"), object: strMsgID)
231-
232232
// self.delegate?.messageCollectionView?(didTapImageMessageBubbleInCell:rect, model: self.message! )
233233
self.delegate?.messageCollectionView?(didTapMessageBubbleInCell: self, model: self.message!)
234234

@@ -238,7 +238,8 @@ open class IMUIBaseMessageCell: UICollectionViewCell, IMUIMessageCellProtocal,Me
238238
}
239239

240240
func tapCellView(){//点击整个cell,隐藏键盘
241-
self.delegate?.messageCollectionView?(tapCellView: "")
241+
// self.delegate?.messageCollectionView?(tapCellView: "")
242+
UIApplication.shared.keyWindow?.endEditing(true)
242243
}
243244

244245

0 commit comments

Comments
 (0)