Skip to content

Commit

Permalink
修复一个tap不能响应的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Cai committed Oct 24, 2018
1 parent 4b9c91e commit 63d380e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion NudeIn.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "NudeIn"
s.version = "1.2.5"
s.version = "1.2.6"
s.summary = "A attributed text component like masonry."

# This description is used to generate tags and improve search results.
Expand Down
16 changes: 8 additions & 8 deletions NudeIn/NUDTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ - (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
if (nTouch.comp != nTouch.originComp) {
[((NUDText *)nTouch.comp) mergeComp:nTouch.originComp];
self.attributedText = [NUDTextUpdate nud_generateStringWith:nTouch.comp maker:self.maker];
if (CGRectContainsPoint(nTouch.glyphRect, nTouch.currentLocation) &&
[self.maker componentInCharacterLocation:nTouch.glyphIndex] == nTouch.comp) {
NUDSelector *selector = [((NUDText *)nTouch.comp) valueForKey:@"selector"];
if (selector) {
NUDTapAction *action = [[NUDTapAction alloc] init];
action.string = ((NUDText *)nTouch.comp).string;
[selector performAction:action];
}
}
if (CGRectContainsPoint(nTouch.glyphRect, nTouch.currentLocation) &&
[self.maker componentInCharacterLocation:nTouch.glyphIndex] == nTouch.comp) {
NUDSelector *selector = [((NUDText *)nTouch.comp) valueForKey:@"selector"];
if (selector) {
NUDTapAction *action = [[NUDTapAction alloc] init];
action.string = ((NUDText *)nTouch.comp).string;
[selector performAction:action];
}
}
}else {}
Expand Down

0 comments on commit 63d380e

Please sign in to comment.