[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance
2016-12-29 15:09
423 查看
错误
app 在线上有个崩溃的问题, crash原因为-[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance.
原因
然后发现是在手写输入的时候会crash,原因是在UIScrollview的category中重写了三个方法如下:-(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]; }1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
UITapGestureRecognizer *tapGr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard:)]; tapGr.cancelsTouchesInView = NO; [backView addGestureRecognizer:tapGr];1
2
3
1
2
3
2.在UITableView上改变键盘
UITapGestureRecognizer *tapGr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard:)]; //记得加这句,不然会屏蔽到TableView的点击事件等 tapGr.cancelsTouchesInView = NO; [tableView addGestureRecognizer:tapGr];1
2
3
4
1
2
3
4
相关文章推荐
- -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance 0x177cc850
- reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance
- -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance 0x5a89960
- reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance
- 错误:-[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance
- -[UIKBBlurredKeyView candidateList]: unrecognized
- -[UIWindow viewForFirstBaselineLayout]: unrecognized selector sent to instance
- [UIDeviceRGBColor length]: unrecognized selector sent to instance
- BugList: Objective C What does -[NSURL length]: unrecognized selector sent to instance 0x
- 手写输入法输入 [UIKBBlurredKeyView candidateList]
- [UIDeviceRGBColor copyWithZone:]: unrecognized selector sent to instance
- [UIImageView setImageWithURL:]: unrecognized selector sent to instance解决办法
- [ios] tableView:cellForRowAtIndexPath: unrecognized selector sent to instance
- iOS 错误[UITableViewCellContentView setText:]: unrecognized selector sent to instance 0x7fb3a9c300d0'
- [UIDeviceRGBColor colorRGBA]: unrecognized selector sent to instance 0xa0791b0 的解决方案
- 学习ios碰到[UITableViewCellContentView setImage:]: unrecognized selector sent to instance 0x7fa450440dc0
- [YFHomeViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x79
- [UIDeviceRGBColor copyWithZone:]: unrecognized selector sent to instance
- [UIView numberOfComponentsInPickerView:]: unrecognized selector sent to instance
- uitableview 滑动时 报错-[__NSCFString objectAtIndex:]: unrecognized selector sent to instance