MZSelectableLabel icon indicating copy to clipboard operation
MZSelectableLabel copied to clipboard

App crashes if scrolled fast

Open MaxHasADHD opened this issue 10 years ago • 3 comments

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 avatar Jul 22 '15 04:07 MaxHasADHD

@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:

meilbn avatar Mar 09 '16 14:03 meilbn

that worked for me.thanks @meilbn

anuj77 avatar Mar 07 '17 04:03 anuj77

@anuj77 You are welcome!

meilbn avatar Mar 07 '17 05:03 meilbn