每当我召唤键盘并键入任何内容时,它都会崩溃
- [NSNull _fastCStringContents:]:无法识别的选择器发送到实例0x102bf4af0 *由于未捕获的异常终止应用' NSInvalidArgumentException',原因:' - [NSNull _fastCStringContents:]:无法识别的选择器发送到实例0x102bf4af0' * 第一次抛出调用堆栈:(0 CoreFoundation 0x00000001029cfe65 exceptionPreprocess + 165 1 libobjc.A.dylib
0x00000001037ffdeb objc_exception_throw + 48 2 CoreFoundation
0x00000001029d848d - [NSObject(NSObject)doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x000000010292590a ___ forwarding _ + 970 4 CoreFoundation 0x00000001029254b8 _CF_forwarding_prep_0 + 120 5 CoreFoundation
0x00000001029bbf23 - [NSTaggedPointerString 比较:选项:范围:locale:] + 243 6基础
0x0000000102d62e37 - [NSString compare:options:range:] + 29 7 UIKit 0x0000000100ef6e6f - [UIPhysicalKeyboardEvent _matchesKeyCommand:] + 303 8 UIKit 0x0000000100e1b3fd - [UIResponder _keyCommandForEvent:target:] + 364 9 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 10 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 11 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 12 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 13 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 14 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 15 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 16 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 17 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 18 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 19 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 20 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 21 UIKit 0x0000000100e1b5b2 - [UIResponder _keyCommandForEvent:target:] + 801 22 UIKit 0x0000000100c2d1aa - [UIApplication handleKeyHIDEvent:] + 397 23 UIKit 0x0000000100c06838 _UIApplicationHandleEventQueue + 5469 24 CoreFoundation 0x00000001028fba31 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 25 CoreFoundation 0x00000001028f195c __CFRunLoopDoSources0 + 556 26 CoreFoundation 0x00000001028f0e13 __CFRunLoopRun + 867 27 CoreFoundation
0x00000001028f0828 CFRunLoopRunSpecific + 488 28图形服务
0x0000000105a89ad2 GSEventRunModal + 161 29 UIKit
0x0000000100c0c610 UIApplicationMain + 171 30 TMEF
0x00000001007a2b6d main + 109 31 libdyld.dylib
0x000000010434192d start + 1)libc ++ abi.dylib:终止于 NSException类型的未捕获异常
有什么建议吗?
答案 0 :(得分:0)
我在这里找到答案:What is causing NSNull length unrecognized selector keyCommand error
基本上在导航堆栈的某个地方有一个包含这些行的故事板
<keyCommands>
<keyCommand/>
</keyCommands>
在文本编辑器中打开您的故事板并搜索它。请注意,它可能不在故事板/场景中导致崩溃,而是在导航堆栈中使用的任何场景中。