iOS UITextField 弹起键盘崩溃 crash

问题描述

iOS UITextField弹起键盘发生了崩溃,如果设置UITextField的键盘会发现某些键盘类型不会崩溃。程序项目中所有的UITextField和UITextView都是这样。

解决办法:

新建一个项目工程,然后把老项目中的文件都拷贝到新项目中,此过程也就十几分钟,调试一下运行。问题解决了。

问题原因:

未知,可能是多人协同开发项目配置文件被修改或者破坏了。

stackoverflow上找到的解决办法,但没说原因,崩溃日志分析结果如下,对照了一下程序,对应的地方没有发现问题。所有键盘弹出都有问题,感觉是项目配置问题,反正是没找到真正原因,如果有找到原因的大神,欢迎感谢分享。也希望写的这些能帮助一些人解决这个问题。
0 UIKit 0x000000018a8de718 -[UICollectionViewData layoutAttributesForItemAtIndexPath:] + 248
1 UIKit 0x000000018a8de704 -[UICollectionViewData layoutAttributesForItemAtIndexPath:] + 228
2 UIKit 0x000000018aa3586c -[UICollectionView layoutAttributesForItemAtIndexPath:] + 148
3 UIKit 0x000000018b0cd044 -[UIKeyboardCandidateBar _scrollToFirstCandidateInSection:withAnimation:] + 280
4 UIKit 0x000000018b0ccb8c -[UIKeyboardCandidateBar _reloadDataByAppendingAtEnd:initiallyHiddenCandidatesChanged:] + 808
5 UIKit 0x000000018b0ca6a0 -[UIKeyboardCandidateBar setCandidates:inlineText:inlineRect:maxX:layout:] + 1096
6 UIKit 0x000000018a8a7e38 -[UIKeyboardImpl updateTextCandidateView] + 2408
7 UIKit 0x000000018a8a6b30 -[UIKeyboardImpl setCandidates:] + 464
8 UIKit 0x000000018acf0ae4 -[UIKeyboardImpl updateCandidateDisplayAsyncWithCandidateSet:] + 720
9 UIKit 0x000000018ace6b3c -[UIKeyboardImpl inputManagerDidGenerateCandidatesForRequest:resultSet:] + 108
10 UIKit 0x000000018ace6954 __78-[UIKeyboardImpl generateCandidatesAsynchronouslyWithRange:selectedCandidate:]_block_invoke_2 + 68
11 UIKit 0x000000018b540fbc -[UIKeyboardTaskEntry execute:] + 192
12 UIKit 0x000000018a8a66d8 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 384
13 CoreFoundation 0x00000001812cdcd0 __invoking___ + 144
14 CoreFoundation 0x00000001811ac56c -[NSInvocation invoke] + 292
15 UIKit 0x000000018a98cb74 -[_UIActionWhenIdle invoke] + 76
16 CoreFoundation 0x000000018126dedc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
17 CoreFoundation 0x000000018126b894 __CFRunLoopDoObservers + 412
18 CoreFoundation 0x000000018126be50 __CFRunLoopRun + 1292
19 CoreFoundation 0x000000018118be58 CFRunLoopRunSpecific + 436
20 GraphicsServices 0x0000000183038f84 GSEventRunModal + 100
21 UIKit 0x000000018a8e067c UIApplicationMain + 236
22 DouLiao 0x0000000104c40114 0x104bc8000 + 491796
23 libdyld.dylib 0x0000000180ca856c start + 4

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值