Link color issue when cell is selected
leizh007 opened this issue · 1 comments
The message is simple:
<JSQMessage: senderId=311756, senderDisplayName=jion171, date=2016-11-05 13:23:00 +0000, isMediaMessage=0, text=双11购物狂欢节1111元红包,分享给你 http://s.click.taobao.com/XWLILQx
---------------------------------------------------------------------------
http://i.huim.com/contents/14771515867258.jpg!290x290.jpg, media=(null)>
I set the link attributes
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = super.collectionView(collectionView, cellForItemAt: indexPath)
if let messageCell = cell as? JSQMessagesCollectionViewCell {
switch viewModel.messageType(at: indexPath.row) {
case .incoming:
messageCell.textView.textColor = .white
case .outgoing:
messageCell.textView.textColor = .black
}
messageCell.textView.linkTextAttributes = [
NSForegroundColorAttributeName: messageCell.textView.textColor ?? .white,
NSUnderlineStyleAttributeName: NSUnderlineStyle.styleSingle.rawValue | NSUnderlineStyle.patternSolid.rawValue
]
}
return cell
}
It works well in normal state:
But when I long pressed the cell and the action menu came out, the link color becomes black.
How to change that black color to white?
Hello everyone!
I'm sorry to inform the community that I'm officially deprecating this project. 😢 Please read my blog post for details:
http://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/
Thus, I'm closing all issues and pull requests and making the necessary updates to formally deprecate the library. I'm sorry if this is unexpected or disappointing. Please know that this was an extremely difficult decision to make. I'd like to thank everyone here for contributing and making this project so great. It was a fun 4 years. 😊
Thanks for understanding,
— jsq