UITextField的自动校正使我的应用程序在使用iOS 4.3SDK构建目标的模拟器上崩溃。在iOS 4.2SDK的设备和模拟器上运行良好。
还有没有人遇到过这个问题?我认为这是4.3版sdk的一个bug?
只要我输入第二个字符。堆栈跟踪
#0 0x01c01000 in objc_assign_ivar ()
#1 0x03b7ec34 in -[AppleSpell init] ()
#2 0x007e7538 in -[UITextChecker _checker] ()
#3 0x007e8de9 in -[UITextChecker checkSpellingOfString:startingAt:language:wrap:correction:] ()
#4 0x0b335725 in TIInputManagerZephyr::lookup_spellcheck_candidates(KB::String const&) ()
#5 0x0b3353f3 in TIInputManagerZephyr::lookup_static_dynamic_candidates(KB::String const&, KB::String const&, KB::Vector<KB::FPoint> const&, bool) ()
#6 0x0b332b2b in TIInputManager::lookup() ()
#7 0x0b332e18 in TIInputManager::autocorrection() ()
#8 0x0b34a06b in -[TIKeyboardInputManagerZephyr autocorrection] ()
#9 0x005cfbe8 in -[UIKeyboardImpl generateCandidatesWithCompletions:] ()
#10 0x005cfc3b in -[UIKeyboardImpl generateCandidates] ()
#11 0x005dca23 in -[UIKeyboardImpl addInputString:fromVariantKey:] ()
#12 0x005de71b in -[UIKeyboardImpl handleKeyEvent:] ()
#13 0x0070a2ee in -[UIKeyboardLayoutStar sendStringAction:forKey:] ()
#14 0x0070ed19 in -[UIKeyboardLayoutStar touchUp:] ()
#15 0x005ebda2 in -[UIKeyboardLayout touchesEnded:withEvent:] ()
#16 0x004b8ded in -[UIWindow _sendTouchesForEvent:] ()
#17 0x00499c37 in -[UIApplication sendEvent:] ()
#18 0x0049ef2e in _UIApplicationHandleEvent ()
#19 0x02011992 in PurpleEventCallback ()
#20 0x0176a944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#21 0x016cacf7 in __CFRunLoopDoSource1 ()
#22 0x016c7f83 in __CFRunLoopRun ()
#23 0x016c7840 in CFRunLoopRunSpecific ()
#24 0x016c7761 in CFRunLoopRunInMode ()
#25 0x020101c4 in GSEventRunModal ()
#26 0x02010289 in GSEventRun ()
#27 0x004a2c93 in UIApplicationMain ()
有时,您会看到一个简单得多的跟踪,它简单地从main开始,然后在objc_assign_ivar
上立即停止。在文本字段中键入内容时也会发生这种情况,例如UISearchBar。
发布于 2011-07-11 11:21:42
在模拟器上,打开设置->键盘并关闭所有选项。这可以防止崩溃(直到错误被解决)。
发布于 2011-04-09 01:16:19
我遇到了同样的问题,在Lion Developer Preview 2上运行4.3模拟器。这是Lion上模拟器中的一个bug。我暂时禁用了自动更正(setAutocorrectionType: UITextAutocorrectionTypeNo)。
发布于 2012-01-04 15:13:28
我们必须按照以下步骤更新模拟器4.3:
重置模拟器并再次运行它。就这样办。
https://stackoverflow.com/questions/5257175
复制相似问题