Texture icon indicating copy to clipboard operation
Texture copied to clipboard

AXTextNode2 when clicked on seeMore sometimes working smooth but sometime flickering

Open abbasnaqvi200 opened this issue 1 year ago • 0 comments

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

abbasnaqvi200 avatar Aug 30 '23 08:08 abbasnaqvi200