【发布时间】:2016-01-07 18:43:35
【问题描述】:
我正在使用这个custom segue。它在 iOS8+ 上完美运行,但是,在 iOS 7 上,我收到此错误。
2015-10-09 13:59:02.891 APPNAME[1790:60b] -[APPNAME.AFBlurSegue setUseDefaultModalPresentationStyle:]: unrecognized selector sent to instance 0x15ddafe0
2015-10-09 13:59:02.901 APPNAME[1790:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[APPNAME.AFBlurSegue setUseDefaultModalPresentationStyle:]: unrecognized selector sent to instance 0x15ddafe0'
*** First throw call stack:
(0x2e5c6f83 0x38d77ccf 0x2e5ca917 0x2e5c9203 0x2e518768 0x312c0381 0x312b63fb 0x30e19037 0x30e18fd7 0x30e18fb1 0x30e04717 0x30e18a2f 0x30e18701 0x30e136cb 0x30de88cd 0x30de6f77 0x2e59220b 0x2e5916db 0x2e58fecf 0x2e4faebf 0x2e4faca3 0x33400663 0x30e4714d 0x13e65c 0x39284ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
问题是,崩溃是模糊的。我什至尝试在任何地方放置断点并尝试捕获抛出的任何错误。但是,它仍然没有指出错误可能在哪里。
这似乎是一个参数/选择器错误,我怀疑这可能是一个 Swift 2 错误。我唯一能找到 setUseDefaultModalPresentationStyle 参考的地方是here。
任何帮助将不胜感激!
【问题讨论】:
-
您可以尝试在
AFBlurSegue中覆盖该方法并在其中放置一个断点,以便您可以看到调用它的堆栈跟踪。可能有助于弄清楚发生了什么。 -
我试过这个,我什至用 Swift 逐行重写了“AFBlurSegue.m”。仍然无法看到堆栈跟踪。
标签: ios objective-c swift ios7 segue