I am a new iOS programming. Now i am creating a sample app which display text using ReadMoreTextView
library. My content may contain many lines but by using this library i can maximumNumberOfLines
to display how many lines of content should be displayed. I implement those content in cell
of UITableView
and i have problem is that, when i use label.attributedReadMoreText = NSAttributedString(string: "...")
then end of content will display ...
and when i click on it and then whole content will be display so, my question is that: How to not letting user click on that ...
because i want user to click on cell
then i will show another view and display whole content there?
How can i achieve something like this? Thank in advance.
This is how i set UITextView
lazy var categoryShortDetailLabel: ReadMoreTextView = {
let label = ReadMoreTextView()
label.font = UIFont(name: "SFCompactText-Regular", size: 16)
label.textColor = .black
label.isEditable = false
label.isSelectable = false
label.maximumNumberOfLines = 3
label.shouldTrim = true
label.attributedReadMoreText = NSAttributedString(string: "...")
label.translatesAutoresizingMaskIntoConstraints = false
return label
}()