Open abbasnaqvi200 opened 1 year ago
if isSeeMore { self.sayText.truncationAttributedText = NSAttributedString(string: "...", attributes: SFAttribute.get(Attribute.themeColor, .semiBold, fontSize)) self.sayText.additionalTruncationMessage = NSAttributedString(string: "See more", attributes: SFAttribute.get(Attribute.themeColor, .semiBold, fontSize)) self.sayText.maximumNumberOfLines = 2 } else { self.sayText.maximumNumberOfLines = self.sayText.lineCount self.sayText.truncationAttributedText = NSAttributedString(string: " ", attributes: SFAttribute.get(Attribute.themeColor, .semiBold, fontSize)) self.sayText.additionalTruncationMessage = NSAttributedString(string: "See less", attributes: SFAttribute.get(Attribute.themeColor, .semiBold, fontSize)) }
self.sayText.attributedText = sayTextAttributedString
//When Clicked on SeemoreButton
func seeMoreClicked(type: String, node: HeaderNode) { debugPrint("seeMoreClicked") node.sayText.maximumNumberOfLines = node.sayText.lineCount node.setNeedsLayout() }
https://github.com/TextureGroup/Texture/assets/33291444/db29474b-438d-4c3b-b6ee-99ec7dc710bf
self.sayText.attributedText = sayTextAttributedString
//When Clicked on SeemoreButton
func seeMoreClicked(type: String, node: HeaderNode) { debugPrint("seeMoreClicked") node.sayText.maximumNumberOfLines = node.sayText.lineCount node.setNeedsLayout() }
https://github.com/TextureGroup/Texture/assets/33291444/db29474b-438d-4c3b-b6ee-99ec7dc710bf