Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AXTextNode2 when clicked on seeMore sometimes working smooth but sometime flickering #2091

Open
abbasnaqvi200 opened this issue Aug 30, 2023 · 0 comments

Comments

@abbasnaqvi200
Copy link

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()
}

RecordIt-03EBA96F-A3BC-4998-960C-CCBE18F27BF5.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant