SwiftUI: How to make see more see less style button at the end of Text?
Xcode 12 — iOS 14
We are going to divide this problem into 2 Parts.
- Detecting if text can/cannot fit in given number of line. On Button click reset line count for text.
- Evaluating text size to add read more/read less at the end to text in the last line and handle click event shrink and expand.