我有一个表视图,其中Iam选择一个表视图的行,然后它命中Web服务,检索数据然后显示。现在这是我的错误日志Iam。
由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:' -
[__NSCFData setDownloadedLogoImage:]: unrecognized selector sent to instance 0x806cf90'
*** Call stack at first throw:
(
0 CoreFoundation 0x02abdb99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02c0d40e objc_exception_throw + 47
2 CoreFoundation 0x02abf6ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02a2f2b6 ___forwarding___ + 966
4 CoreFoundation 0x02a2ee72 _CF_forwarding_prep_0 + 50
5 FlightSearch 0x000401ef -[AirlineNames connectionDidFinishImage:] + 168
6 FlightSearch 0x0002f535 -[SAHttpManager connectionDidFinishLoading:] + 195
7 Foundation 0x001acb96 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 108
8 Foundation 0x001acaef _NSURLConnectionDidFinishLoading + 133
9 CFNetwork 0x0307172f _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 285
10 CFNetwork 0x0313cfcf _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 389
11 CFNetwork 0x03066968 _ZN19URLConnectionClient13processEventsEv + 100
12 CFNetwork 0x030667e5 _ZN17MultiplexerSource7performEv + 251
13 CoreFoundation 0x02a9efaf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
14 CoreFoundation 0x029fd39b __CFRunLoopDoSources0 + 571
15 CoreFoundation 0x029fc896 __CFRunLoopRun + 470
16 CoreFoundation 0x029fc350 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x029fc271 CFRunLoopRunInMode + 97
18 GraphicsServices 0x032b000c GSEventRunModal + 217
19 GraphicsServices 0x032b00d1 GSEventRun + 115
20 UIKit 0x00419af2 UIApplicationMain + 1160
21 FlightSearch 0x00001e86 main + 84
22 FlightSearch 0x00001e29 start + 53
23 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
请建议我该怎么做。
答案 0 :(得分:0)
您正在向setDownloadedLogoImage:
对象发送消息NSData
,该对象不知道如何处理它!发生了两件事之一:
1)你没有保留一些东西。看一下你期望打电话给setDownloadedLogoImage
的任何对象并找出你创建它的位置 - 你应该把它保留在那里;)
2)(不太可能)你的代码是错的!将其添加到您的问题中,我们可以看看。