热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

UITextField碰撞碰撞-iOS8

如何解决《UITextField碰撞碰撞-iOS8》经验,为你挑选了1个好方法。

我的项目在iOS7上运行良好.但是当我在iOs8上试用它时,UITextFields崩溃了应用程序.我在我的一个故事板上添加了一个全新的UITextField,并触摸新创建的UITextField(没有代表附加到textfield),应用程序再次崩溃.我已经把它整整一天放在上面,你的帮助将受到高度赞赏.

(
    0   CoreFoundation                      0x000000010d71af35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010d3afbb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010d721f4d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010d67a27c ___forwarding___ + 988
    4   CoreFoundation                      0x000000010d679e18 _CF_forwarding_prep_0 + 120
    5   CoreFoundation                      0x000000010d60d13d CFStringGetCString + 173
    6   CoreFoundation                      0x000000010d6316ac CFLocaleCreateCanonicalLanguageIdentifierFromString + 76
    7   CoreFoundation                      0x000000010d698e0f CFStringTokenizerCreate + 847
    8   UIKit                               0x000000010c3b6d58 __91-[_UITextInputControllerTokenizer _getClosestTokenRangeForPosition:granularity:downstream:]_block_invoke44 + 253
    9   UIFoundation                        0x00000001154f406b -[NSTextStorage coordinateReading:] + 42
    10  UIKit                               0x000000010c3b6a29 -[_UITextInputControllerTokenizer _getClosestTokenRangeForPosition:granularity:downstream:] + 322
    11  UIKit                               0x000000010c0b279c -[UITextInputStringTokenizer positionFromPosition:toBoundary:inDirection:] + 72
    12  UIKit                               0x000000010c0b2e4e -[TIDocumentState(UITextInputAdditions) _contextBeforePosition:inDocument:] + 68
    13  UIKit                               0x000000010c0b2f91 -[TIDocumentState(UITextInputAdditions) initWithDocument:] + 110
    14  UIKit                               0x000000010c0b2aea +[TIDocumentState(UITextInputAdditions) documentStateOfDocument:] + 50
    15  UIKit                               0x000000010be49683 -[UIKeyboardImpl syncDocumentStateToInputDelegateWithExecutionContext:] + 288
    16  UIKit                               0x000000010be49edb -[UIKeyboardImpl updateForChangedSelectionWithExecutionContext:] + 296
    17  UIKit                               0x000000010c3b7914 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 332
    18  UIKit                               0x000000010be4471f -[UIKeyboardImpl setDelegate:force:] + 2031
    19  UIKit                               0x000000010c112a12 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 902
    20  UIKit                               0x000000010bdcf31d -[UIResponder becomeFirstResponder] + 468
    21  UIKit                               0x000000010bcc4e03 -[UIView(Hierarchy) becomeFirstResponder] + 99
    22  UIKit                               0x000000010c38bad7 -[UITextField becomeFirstResponder] + 51
    23  UIKit                               0x000000010c0139c1 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 177
    24  UIKit                               0x000000010c015a30 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2263
    25  UIKit                               0x000000010c00b2e6 _UIGestureRecognizerSendActions + 262
    26  UIKit                               0x000000010c009f89 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 532
    27  UIKit                               0x000000010c00eba6 ___UIGestureRecognizerUpdate_block_invoke662 + 51
    28  UIKit                               0x000000010c00eaa2 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 254
    29  UIKit                               0x000000010c004b1d _UIGestureRecognizerUpdate + 2796
    30  UIKit                               0x000000010bc9eff6 -[UIWindow _sendGesturesForEvent:] + 1041
    31  UIKit                               0x000000010bc9fc23 -[UIWindow sendEvent:] + 667
    32  UIKit                               0x000000010bc6c9b1 -[UIApplication sendEvent:] + 246
    33  UIKit                               0x000000010bc79a7d _UIApplicationHandleEventFromQueueEvent + 17370
    34  UIKit                               0x000000010bc55103 _UIApplicationHandleEventQueue + 1961
    35  CoreFoundation                      0x000000010d650551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    36  CoreFoundation                      0x000000010d64641d __CFRunLoopDoSources0 + 269
    37  CoreFoundation                      0x000000010d645a54 __CFRunLoopRun + 868
    38  CoreFoundation                      0x000000010d645486 CFRunLoopRunSpecific + 470
    39  GraphicsServices                    0x00000001121bd9f0 GSEventRunModal + 161
    40  UIKit                               0x000000010bc58420 UIApplicationMain + 1282
    41  FIM                                 0x00000001092d88e1 main + 65
    42  libdyld.dylib                       0x000000010de50145 start + 1

小智.. 6

出于某种原因Sergiy Salyuk没有发表回答,但他的评论有效.

问题在于替换"AppleLanguages"中的初始语言数组 NSUserDefaults

它节省了很多次,因为问题只出现在测试仪设备上,在其他国家,我不知道如何找到崩溃与此跟踪和"AppleLanguages"的连接NSUserDefaults.

再次感谢Sergiy.



1> 小智..:

出于某种原因Sergiy Salyuk没有发表回答,但他的评论有效.

问题在于替换"AppleLanguages"中的初始语言数组 NSUserDefaults

它节省了很多次,因为问题只出现在测试仪设备上,在其他国家,我不知道如何找到崩溃与此跟踪和"AppleLanguages"的连接NSUserDefaults.

再次感谢Sergiy.


推荐阅读
author-avatar
铜钱
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有