Texture
Texture copied to clipboard
AXTextNode2 when clicked on seeMore sometimes working smooth but sometime flickering
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