File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
MYCoreText_Example/MYCoreTextLabel Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,9 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
320320- (void )touchesEnded : (NSSet <UITouch *> *)touches withEvent : (UIEvent *)event
321321{
322322 [self dismissAnimation ];
323+ if ([self .delegate respondsToSelector: @selector (coreTextLabelLinkTouch:link:type: )]) {
324+ [self .delegate coreTextLabelLinkTouch: self link: self .currentTouchLink.linkText type: self .currentTouchLink.linkType];
325+ }
323326}
324327
325328- (void )touchesMoved : (NSSet <UITouch *> *)touches withEvent : (UIEvent *)event
@@ -358,9 +361,9 @@ - (MYLinkModel *)selectedLink:(CGPoint)touchPoint
358361 linkModel = link;
359362 self.currentTouchLink = link; // 记录当前点击
360363 // 回调内容
361- if ([self .delegate respondsToSelector: @selector (coreTextLabelLinkTouch:link:type: )]) {
362- [self .delegate coreTextLabelLinkTouch: self link: linkModel.linkText type: linkModel.linkType];
363- }
364+ // if ([self.delegate respondsToSelector:@selector(coreTextLabelLinkTouch:link:type:)]) {
365+ // [self.delegate coreTextLabelLinkTouch:self link:linkModel.linkText type:linkModel.linkType];
366+ // }
364367 break ;
365368 }
366369 }
You can’t perform that action at this time.
0 commit comments