2012-08-17 3 views
1

안녕하세요, 저는 Facebook에서 이미지를로드하기 위해 SDWebImage를 통합했습니다. 모든 일이 시뮬레이터에서 잘 작동하지만 장치에서 실행하려고 할 때 오류 제공 : [cell.contactImageView setImageWithURL:[NSURL URLWithString:[[contactList objectAtIndex:indexPath.row] objectForKey:PICTURE_KEY]]placeholderImage:[UIImage imageNamed:@"placeholder.png"]];SDWebImage가 기기에서 작동하지 않습니다.

:

terminate called after throwing an instance of ‘NSException’ 

이 충돌에오고

B'dayReminderPlus[415:307] -[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x4f7d310 

2012-08-17 14:45:15.301 B'dayReminderPlus[415:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x4f7d310' 

*** Call stack at first throw: 

(

0 CoreFoundation      0x3759dc7b __exceptionPreprocess + 114 
1 libobjc.A.dylib      0x32d9bee8 objc_exception_throw + 40 
2 CoreFoundation      0x3759f3e3 -[NSObject(NSObject) doesNotRecognizeSelector:] + 98 
3 CoreFoundation      0x37544467 ___forwarding___ + 506 
4 CoreFoundation      0x37544220 _CF_forwarding_prep_0 + 48 
5 B'dayReminderPlus     0x000213e9 -[DLFirstScreenViewController tableView:cellForRowAtIndexPath:] + 5012 
6 UIKit        0x359600a0 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 668 
7 UIKit        0x3595fdcc -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 52 
8 UIKit        0x3595db84 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1308 
9 UIKit        0x3595c838 -[UITableView layoutSubviews] + 208 
10 UIKit        0x358ec70c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 40 
11 CoreFoundation      0x37538f79 -[NSObject(NSObject) performSelector:withObject:] + 24 
12 QuartzCore       0x33d9a130 -[CALayer layoutSublayers] + 184 
13 QuartzCore       0x33d99db8 CALayerLayoutIfNeeded + 200 
14 QuartzCore       0x33d917c0 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 268 
15 QuartzCore       0x33d91518 _ZN2CA11Transaction6commitEv + 284 
16 QuartzCore       0x33dc3c28 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 88 
17 CoreFoundation      0x3752a80f __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18 
18 CoreFoundation      0x3752a63d __CFRunLoopDoObservers + 500 
19 CoreFoundation      0x3752199d __CFRunLoopRun + 940 
20 CoreFoundation      0x3752150b CFRunLoopRunSpecific + 226 
21 CoreFoundation      0x37521419 CFRunLoopRunInMode + 60 
22 GraphicsServices     0x33e76d24 GSEventRunModal + 196 
23 UIKit        0x3591d57c -[UIApplication _run] + 588 
24 UIKit        0x3591a558 UIApplicationMain + 972 
25 B'dayReminderPlus     0x00002703 main + 106 
26 B'dayReminderPlus     0x00002694 start + 40 

를)

시뮬레이터에서 APP를 실행하는 동안 왜이 충돌이 발생하는지 명확하지 않습니다. 어떤 도움을 주시면 감사하겠습니다. 고맙습니다.

+0

'UIImageView + WebCache'를 가져 왔습니까? 당신이했는지 확인하십시오. – janusbalatbat

+0

예. UIImageView + WebCache'를 가져 오지 않으면 시뮬레이터에서 오류가 발생합니다. – iCoder4777

+0

타겟 종속성에'SDWebImage' (ARC 또는 아님)를 포함 시켰습니까? –

답변

1

기기에서 실행 중일 때도이 문제가 발생했습니다. "기타 링커 플래그"설정에서 "-Objc"플래그를 추가하는 것을 잊었습니다.

링커 플래그

를 열고 "빌드 설정"탭에서 "연결"섹션에서 설정 "기타 링커 플래그"를 찾아 추가하고 "-ObjC"플래그 추가

관련 문제