mirror of
https://github.com/zhigang1992/CCHLinkTextView.git
synced 2026-01-12 22:46:17 +08:00
Make text view non-editable and non-selectable by default
This commit is contained in:
@@ -76,9 +76,6 @@
|
||||
|
||||
- (void)setUpLinkTextView:(CCHLinkTextView *)linkTextView
|
||||
{
|
||||
linkTextView.editable = NO;
|
||||
linkTextView.selectable = NO;
|
||||
|
||||
NSMutableAttributedString *attributedText = [linkTextView.attributedText mutableCopy];
|
||||
if (attributedText) {
|
||||
[attributedText addAttribute:CCHLinkAttributeName value:@"0" range:NSMakeRange(0, 20)];
|
||||
|
||||
@@ -66,6 +66,8 @@ NSString *const CCHLinkAttributeName = @"CCHLinkAttributeName";
|
||||
[self addGestureRecognizer:self.linkGestureRecognizer];
|
||||
|
||||
self.tapAreaInsets = UIEdgeInsetsMake(-5, -5, -5, -5);
|
||||
self.editable = NO;
|
||||
self.selectable = NO;
|
||||
}
|
||||
|
||||
- (id)debugQuickLookObject
|
||||
|
||||
Reference in New Issue
Block a user