首页 编程 软件学院 查看内容

中文手写输入法在iOS8.1上的崩溃问题

2014-11-19 10:46 1159 0

摘要: 在中文手写输入法输入时,会导致app崩溃,在debug时,报错为:2014-10-22 14:45:10.269 App[524:170755] -[UIKBBlurredKeyView candid...
关键词: nbsp withEvent event touches dragging touchesBegan 代码 touchesEnded self UIEvent

在中文手写输入法输入时,会导致app崩溃,在debug时,报错为:2014-10-22 14:45:10.269 App[524:170755] -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance 0x16ff44b0经过一番折腾,确认是- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event错误使用导致的。在某个不相关的视图控制器类以前加了下列代码。@implementation UIScrollView (touch)- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{    // If not dragging, send event to next responder    if (!self.dragging) {        [self.nextResponder touchesBegan:touches withEvent:event];    } else {        [super touchesEnded:touches withEvent:event];    }}- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{    // If not dragging, send event to next responder    if (!self.dragging) {        [self.nextResponder touchesBegan:touches withEvent:event];    } else {        [super touchesEnded:touches withEvent:event];    }}- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{    // If not dragging, send event to next responder    if (!self.dragging) {        [self.nextResponder touchesBegan:touches withEvent:event];    } else {        [super touchesEnded:touches withEvent:event];    }}但是,这里有两个问题。一,我开始使用xcode6的搜索功能,但没有找到这个代码。因为搜索没有找到这段代码,导致后来的折腾时间延长。因此,xcode6的搜索功能不可信。二,这段代码存在于一个不相关的视图控制器类,虽然该类被main.storyboard应用了,但并没有加载,我以为没有应用到全局应用代码里。现在看来不是,一样对整个应用代码生效。
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部