-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// YYTextHighlight+NSLink.h | ||
// YYTextDemo | ||
// | ||
// Created by Frank on 2021/4/8. | ||
// Copyright © 2021 ibireme. All rights reserved. | ||
// | ||
|
||
#import "YYTextAttribute.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface YYTextHighlight (NSLink) | ||
|
||
@property (nonatomic) NSURL *link; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// YYTextHighlight+NSLink.m | ||
// YYTextDemo | ||
// | ||
// Created by Frank on 2021/4/8. | ||
// Copyright © 2021 ibireme. All rights reserved. | ||
// | ||
|
||
#import "YYTextHighlight+NSLink.h" | ||
|
||
@implementation YYTextHighlight (NSLink) | ||
|
||
- (NSURL *)link { | ||
return self.userInfo[@"NSLink.URL"]; | ||
} | ||
|
||
- (void)setLink:(NSURL *)link { | ||
NSMutableDictionary *info = self.userInfo ? [self.userInfo mutableCopy] : [NSMutableDictionary new]; | ||
info[@"NSLink.URL"] = link; | ||
self.userInfo = info; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters