美文网首页
[UIKBBlurredKeyView candidateLis

[UIKBBlurredKeyView candidateLis

作者: 啵啵_long_港 | 来源:发表于2017-12-26 18:32 被阅读8次

    出现crash原因:

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
             [[self nextResponder] touchesBegan:touches withEvent:event];
             if ([super respondsToSelector:@selector(touchesBegan:withEvent:)]) {
                 [super touchesBegan:touches withEvent:event];
             }
    }
    

    解决方案:

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
        if ([self isMemberOfClass:[UIScrollView class]]) {
             [[self nextResponder] touchesBegan:touches withEvent:event];
             if ([super respondsToSelector:@selector(touchesBegan:withEvent:)]) {
                 [super touchesBegan:touches withEvent:event];
             }
        }
    }
    

    相关文章

      网友评论

          本文标题:[UIKBBlurredKeyView candidateLis

          本文链接:https://www.haomeiwen.com/subject/lgojgxtx.html