由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因:'-[SWRevealViewController revealToggel:]
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SWRevealViewController revealToggel:]
我正在学习有关使用 Swift [开发 iOS 应用程序 (Swift)] 创建 iOS 应用程序的 Apple 教程,并且我已完全按照每个步骤进行操作事实上。这个应用程序在模拟器中 运行 完美无缺,但突然开始抛出 SIGABRT 错误(我做了一个简短的研究以了解 SIGABRT(信号中止)错误是什么,我什至找到了一些其他答案,但似乎没有人解决我的问题)。
控制台输出:
2017-10-25 02:00:23.553 myApplication[1358:48276] -[SWRevealViewController revealToggel:]: 无法识别的选择器发送到实例 0x7ff74c813400
2017-10-25 02:00:23.824 myApplication[1358:48276] *** 由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因:'-[SWRevealViewController revealToggel:]:无法识别的选择器发送到实例 0x7ff74c813400'
*** 首先抛出调用栈:
(
0 核心基础 0x000000010a39ae65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000109e11deb objc_exception_throw + 48
2 CoreFoundation 0x000000010a3a348d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 核心基础 0x000000010a2f090a ___forwarding___ + 970
4 核心基础 0x000000010a2f04b8 _CF_forwarding_prep_0 + 120
5 UIKit 0x000000010a973194 -[UIApplication sendAction:to:from:forEvent:] + 92
6 UIKit 0x000000010ad747b7 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 152
7 UIKit 0x000000010a973194 -[UIApplication sendAction:to:from:forEvent:] + 92
8 UIKit 0x000000010aae26fc -[UIControl sendAction:to:forEvent:] + 67
9 UIKit 0x000000010aae29c8 -[UIControl _sendActionsForEvents:withEvent:] + 311
10 UIKit 0x000000010aae2b43 -[UIControl _sendActionsForEvents:withEvent:] + 690
11 UIKit 0x000000010aae1af8 -[UIControl touchesEnded:withEvent:] + 601
12 UIKit 0x000000010a9e249b -[UIWindow _sendTouchesForEvent:] + 835
13 UIKit 0x000000010a9e31d0 -[UIWindow 发送事件:] + 865
14 UIKit 0x000000010a991b66 -[UIApplication sendEvent:] + 263
15 UIKit 0x000000010a96bd97 _UIApplicationHandleEventQueue + 6844
16 核心基础 0x000000010a2c6a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 核心基础 0x000000010a2bc95c __CFRunLoopDoSources0 + 556
18 核心基础 0x000000010a2bbe13 __CFRunLoopRun + 867
19 核心基础 0x000000010a2bb828 CFRunLoopRunSpecific + 488
20 图形服务 0x000000010f092ad2 GSEventRunModal + 161
21 UIKit 0x000000010a971610 UIApplicationMain + 171
22 我的应用程序 0x00000001098f224d 主要 + 109
23 libdyld.dylib 0x000000010d2c392d 开始 + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: 以 NSException 类型的未捕获异常终止
打字错误?应该是 revealToggle
...
我想你拼错了 revealToggel:
。应该是 revealToggle:
.
我正在学习有关使用 Swift [开发 iOS 应用程序 (Swift)] 创建 iOS 应用程序的 Apple 教程,并且我已完全按照每个步骤进行操作事实上。这个应用程序在模拟器中 运行 完美无缺,但突然开始抛出 SIGABRT 错误(我做了一个简短的研究以了解 SIGABRT(信号中止)错误是什么,我什至找到了一些其他答案,但似乎没有人解决我的问题)。
控制台输出:
2017-10-25 02:00:23.553 myApplication[1358:48276] -[SWRevealViewController revealToggel:]: 无法识别的选择器发送到实例 0x7ff74c813400 2017-10-25 02:00:23.824 myApplication[1358:48276] *** 由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因:'-[SWRevealViewController revealToggel:]:无法识别的选择器发送到实例 0x7ff74c813400' *** 首先抛出调用栈: ( 0 核心基础 0x000000010a39ae65 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000109e11deb objc_exception_throw + 48 2 CoreFoundation 0x000000010a3a348d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 核心基础 0x000000010a2f090a ___forwarding___ + 970 4 核心基础 0x000000010a2f04b8 _CF_forwarding_prep_0 + 120 5 UIKit 0x000000010a973194 -[UIApplication sendAction:to:from:forEvent:] + 92 6 UIKit 0x000000010ad747b7 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 152 7 UIKit 0x000000010a973194 -[UIApplication sendAction:to:from:forEvent:] + 92 8 UIKit 0x000000010aae26fc -[UIControl sendAction:to:forEvent:] + 67 9 UIKit 0x000000010aae29c8 -[UIControl _sendActionsForEvents:withEvent:] + 311 10 UIKit 0x000000010aae2b43 -[UIControl _sendActionsForEvents:withEvent:] + 690 11 UIKit 0x000000010aae1af8 -[UIControl touchesEnded:withEvent:] + 601 12 UIKit 0x000000010a9e249b -[UIWindow _sendTouchesForEvent:] + 835 13 UIKit 0x000000010a9e31d0 -[UIWindow 发送事件:] + 865 14 UIKit 0x000000010a991b66 -[UIApplication sendEvent:] + 263 15 UIKit 0x000000010a96bd97 _UIApplicationHandleEventQueue + 6844 16 核心基础 0x000000010a2c6a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 17 核心基础 0x000000010a2bc95c __CFRunLoopDoSources0 + 556 18 核心基础 0x000000010a2bbe13 __CFRunLoopRun + 867 19 核心基础 0x000000010a2bb828 CFRunLoopRunSpecific + 488 20 图形服务 0x000000010f092ad2 GSEventRunModal + 161 21 UIKit 0x000000010a971610 UIApplicationMain + 171 22 我的应用程序 0x00000001098f224d 主要 + 109 23 libdyld.dylib 0x000000010d2c392d 开始 + 1 24 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: 以 NSException 类型的未捕获异常终止
打字错误?应该是 revealToggle
...
我想你拼错了 revealToggel:
。应该是 revealToggle:
.