MZSelectableLabel
MZSelectableLabel copied to clipboard
App crashes if scrolled fast
If this is used in a table view cell, and scrolled fast it will crash the app at
if (range.length && selectedRange && selectedRange.highlightColor) { [self.textStorage addAttribute:NSForegroundColorAttributeName value:selectedRange.highlightColor range:range]; }
@MaxHasADHD
I has same problem, reuse the label in a view, but not in a UITableViewCell, and I resolved this problem, you should add [label.selectableRanges removeAllObjects]; before setSelectableRange:hightlightedBackgroundColor:
that worked for me.thanks @meilbn
@anuj77 You are welcome!