美文网首页
ios 手写键盘崩问题 UIKBBlurredKeyView c

ios 手写键盘崩问题 UIKBBlurredKeyView c

作者: 李炯7115 | 来源:发表于2017-10-10 10:19 被阅读73次

问题描述

在输入UITextField时,调出系统的手写键盘,在输入第二个字时,APP闪退

打印崩溃信息:UIKBBlurredKeyView candidateList:

unrecognized

问题所在

给UIScrollView增加的Category中重写了触摸方法(用于手势向下传递):

在本类存在:#import "UIScrollView+UITouch.h"

做如下操作

//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

//    [[self nextResponder] touchesBegan:touches withEvent:event];

//    [super touchesBegan:touches withEvent:event];

//}

//

//-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

//    [[self nextResponder] touchesMoved:touches withEvent:event];

//    [super touchesMoved:touches withEvent:event];

//}

//

//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {

//    [[self nextResponder] touchesEnded:touches withEvent:event];

//    [super touchesEnded:touches withEvent:event];

//}

手写键盘与这个触摸冲突,引发Crash

解决办法

1.你扩展了某个UIView or UIScrollVIew 的Category,并且重写了UITouchBegans、move、end方法。屏蔽该3个方法即可。

2.你当前的Controller 可能覆盖了1中的3个方法,也是屏蔽即可。

3.搜索其他覆盖1中的3个方法,屏蔽即可。

相关文章

网友评论

      本文标题:ios 手写键盘崩问题 UIKBBlurredKeyView c

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