File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
MYCoreText_Example/MYCoreTextLabel Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 25
25
- (void )coreTextLabelLinkTouch : (MYCoreTextLabel *)coreTextLabel link : (NSString *)linkString type : (MYLinkType)linkType ;
26
26
// 除开链接以外点击回调
27
27
- (void )coreTextLabelBlankTouch : (MYCoreTextLabel *)coreTextLabel ;
28
+ - (void )coreTextLabelLinkTouch : (MYCoreTextLabel *)coreTextLabel link : (NSString *)linkString type : (MYLinkType)linkType linkRange : (NSRange )range ;
28
29
29
30
@end
30
31
Original file line number Diff line number Diff line change @@ -325,6 +325,10 @@ - (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
325
325
if ([self .delegate respondsToSelector: @selector (coreTextLabelLinkTouch:link:type: )]) {
326
326
[self .delegate coreTextLabelLinkTouch: self link: self .currentTouchLink.linkText type: self .currentTouchLink.linkType];
327
327
}
328
+ if ([self .delegate respondsToSelector: @selector (coreTextLabelLinkTouch:link:type:linkRange: )]) {
329
+ [self .delegate coreTextLabelLinkTouch: self link: self .currentTouchLink.linkText type: self .currentTouchLink.linkType linkRange: self .currentTouchLink.range];
330
+ }
331
+
328
332
self.currentTouchLink = nil ;
329
333
});
330
334
}
You can’t perform that action at this time.
0 commit comments