关键崩溃点是 – [NSObject(NSObject)doesNotRecognizeSelector:]和MyVIEwController.m第596行 – [MyVIEwController prepareForSegue:sender:].我不知道日志中的问题是什么.是否可能出现多线程问题?我也在使用Parse SDK从Parse云中检索数据.而prepareForSegue:sender:方法将在用户点击披露指标时调用,它应该在主线程中运行.你能不能给我一些提示来解决这个问题.提前致谢.
这是我如何调用prepareForSegue:sender:method.
- (voID)tableVIEw:(UItableVIEw *)tableVIEw accessorybuttonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{ [self performSegueWithIDentifIEr:@"onesegue" sender:indexPath];}- (voID)prepareForSegue:(UIStoryboardSegue *)segue sender:(ID)sender{ if ([segue.IDentifIEr isEqualToString:@"onesegue"]) { NSIndexPath *indexPath = (NSIndexPath*)sender; OneVIEwController *destVIEwController = segue.destinationVIEwController; OneClass* oneObject = self.array[indexPath.row]; destVIEwController.objectname = oneObject.name; }}
prepareForSegue:sender:方法由accessorybuttonTappedForRowWithIndexPath:方法触发.我看不到任何其他方式来调用prepareForSegue:sender:方法.所以我不知道为什么indexPath.row会导致异常.
Fatal Exception NSinvalidargumentexception-[UItableVIEwCell row]: unrecognized selector sent to instance 0x1f8a6dd00 CoreFoundation __exceptionPreprocess + 1621 libobjc.A.dylib objc_exception_throw + 302 **CoreFoundation -[NSObject(NSObject) doesNotRecognizeSelector:] + 170**3 CoreFoundation ___forwarding___ + 3924 CoreFoundation _CF_forwarding_prep_0 + 245 MyApp MyVIEwController.m line 596**-[MyVIEwController prepareForSegue:sender:]**6 UIKit -[UIStoryboardSegueTemplate _perform:] + 1287 UIKit -[UItableVIEw _selectRowAtIndexPath:animated:scrollposition:notifyDelegate:] + 8288 UIKit -[UItableVIEw _userSelectRowAtPendingSelectionIndexPath:] + 1569 ... Foundation __NSFireDelayedPerform + 45010 CoreFoundation __CFRUNLOOP_IS_CALliNG_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 1411 CoreFoundation __CFRunLoopDoTimer + 27212 CoreFoundation __CFRunLoopRun + 123213 CoreFoundation CFRunLoopRunspecific + 35614 CoreFoundation CFRunLoopRunInMode + 10415 GraphiCSServices GSEventRunModal + 7416 UIKit UIApplicationMain + 112017 MyApp main.m line 16main18 libdyld.dylib start9 Threadscom.apple.main-thread Crashed0 ... libsystem_kernel.dylib __pthread_kill + 81 libsystem_c.dylib pthread_kill + 582 libsystem_c.dylib abort + 943 libc++abi.dylib abort_message + 744 libc++abi.dylib default_terminate() + 245 libobjc.A.dylib _objc_terminate() + 1466 libc++abi.dylib safe_handler_caller(voID (*)()) + 787 libc++abi.dylib std::terminate() + 198 libc++abi.dylib __cxa_current_exception_type9 libobjc.A.dylib objc_exception_rethrow + 1210 CoreFoundation CFRunLoopRunspecific + 45611 CoreFoundation CFRunLoopRunInMode + 10412 GraphiCSServices GSEventRunModal + 7413 UIKit UIApplicationMain + 112014 MyApp main.m line 16maincom.apple.libdispatch-manager0 ... libsystem_kernel.dylib kevent64 + 241 libdispatch.dylib _dispatch_mgr_invoke + 7962 libdispatch.dylib _dispatch_mgr_thread$VARIANT$mp + 35WebThread0 ... libsystem_kernel.dylib mach_msg_trap + 201 libsystem_kernel.dylib mach_msg + 402 CoreFoundation __CFRunLoopServiceMachPort + 1283 CoreFoundation __CFRunLoopRun + 8824 CoreFoundation CFRunLoopRunspecific + 3565 CoreFoundation CFRunLoopRunInMode + 1046 WebCore RunWebThread(voID*) + 4447 libsystem_c.dylib _pthread_start + 308com.crashlytics.MachExceptionServer0 libsystem_kernel.dylib mach_msg_trap + 201 libsystem_kernel.dylib mach_msg + 402 MyApp CLSMachExceptionServer3 libsystem_c.dylib _pthread_start + 308com.apple.NSURLConnectionLoader0 ... libsystem_kernel.dylib mach_msg_trap + 201 libsystem_kernel.dylib mach_msg + 402 CoreFoundation __CFRunLoopServiceMachPort + 1283 CoreFoundation __CFRunLoopRun + 8824 CoreFoundation CFRunLoopRunspecific + 3565 CoreFoundation CFRunLoopRunInMode + 1046 Foundation +[NSURLConnection(Loader) _resourceLoadLoop:] + 3087 Foundation __NSThread__main__ + 9728 libsystem_c.dylib _pthread_start + 308Thread 50 ... libsystem_kernel.dylib mach_msg_trap + 201 libsystem_kernel.dylib mach_msg + 402 CoreFoundation __CFRunLoopServiceMachPort + 1283 CoreFoundation __CFRunLoopRun + 8824 CoreFoundation CFRunLoopRunspecific + 3565 CoreFoundation CFRunLoopRunInMode + 1046 Foundation -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 2547 Foundation -[NSRunLoop(NSRunLoop) run] + 808 MyApp PF_AFURLConnectionoperation.m line 151+[PF_AFURLConnectionoperation networkRequestThreadEntryPoint:]9 Foundation __NSThread__main__ + 97210 libsystem_c.dylib _pthread_start + 308Thread 60 ... libsystem_kernel.dylib __psynch_cvwait + 241 libsystem_c.dylib _pthread_cond_wait + 6462 libsystem_c.dylib pthread_cond_wait + 403 Foundation -[NSCondition wait] + 1944 MyApp PFCommandCache.m line 495-[PFCommandCache runLoop]5 Foundation __NSThread__main__ + 9726 libsystem_c.dylib _pthread_start + 308com.apple.CFSocket.private0 ... libsystem_kernel.dylib __select + 201 CoreFoundation __CFSocketManager + 6782 libsystem_c.dylib _pthread_start + 308Thread 80 ... libsystem_kernel.dylib __workq_kernreturn + 81 libsystem_c.dylib _pthread_workq_return + 182 libsystem_c.dylib _pthread_wqthread + 365Blog Privacy解决方法 这是因为在视图中你正在打开,在某个地方你试图在UItableVIEwCell上调用一个名为row的方法.
您可以在崩溃日志的第一行看到这一点:
-[UItableVIEwCell row]: unrecognized selector sent to instance 0x1f8a6dd0
您应该跟踪您正在调用行的对象,并确保在您认为自己的对象上调用它而不是UItableVIEwCell.
总结以上是内存溢出为你收集整理的ios – – [NSObject(NSObject)doesNotRecognizeSelector:]调用时崩溃 – [ViewController prepareForSegue:sender:]全部内容,希望文章能够帮你解决ios – – [NSObject(NSObject)doesNotRecognizeSelector:]调用时崩溃 – [ViewController prepareForSegue:sender:]所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)