세 가지 선택 항목이있는 세분화 된 컨트롤이 있습니다. 각 선택 항목마다 다른 계산이 수행됩니다. 계산은 문자열 조작입니다.Objective-C NSInvalidArgumentException
내가 처음 앱을 시작하면 문자열이 nil, btw입니다. 세분화 된 컨트롤에서 세 가지 옵션을 모두 터치하면 앱이 중단되고 여기에 스택 추적이 표시됩니다.
나는 모든 곳을 수색했지만 아직 문제를 찾을 수 없습니다.
[Session started at 2011-02-25 01:21:03 -0500.]
2011-02-25 01:21:07.075 tipApp[2184:207] -[_UIStretchableImage isEqualToString:]: unrecognized selector sent to instance 0x4b5c0a0
2011-02-25 01:21:07.078 tipApp[2184:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIStretchableImage isEqualToString:]: unrecognized selector sent to instance 0x4b5c0a0'
*** Call stack at first throw:
(
0 CoreFoundation 0x00db7be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f0c5c2 objc_exception_throw + 47
2 CoreFoundation 0x00db96fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00d29366 ___forwarding___ + 966
4 CoreFoundation 0x00d28f22 _CF_forwarding_prep_0 + 50
5 tipApp 0x00006f13 -[tipAppViewController exact] + 56
6 tipApp 0x00006ed3 -[tipAppViewController mirror] + 4772
7 tipApp 0x000057f2 -[tipAppViewController segmentedControlIndexChanged] + 104
8 UIKit 0x002c0a6e -[UIApplication sendAction:to:from:forEvent:] + 119
9 UIKit 0x0034f1b5 -[UIControl sendAction:to:forEvent:] + 67
10 UIKit 0x00351647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
11 UIKit 0x0034f16c -[UIControl sendActionsForControlEvents:] + 49
12 UIKit 0x0038e6b2 -[UISegmentedControl setSelectedSegmentIndex:] + 574
13 UIKit 0x0039317e -[UISegmentedControl touchesBegan:withEvent:] + 971
14 UIKit 0x002e5025 -[UIWindow _sendTouchesForEvent:] + 395
15 UIKit 0x002c637a -[UIApplication sendEvent:] + 447
16 UIKit 0x002cb732 _UIApplicationHandleEvent + 7576
17 GraphicsServices 0x016eda36 PurpleEventCallback + 1550
18 CoreFoundation 0x00d99064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
19 CoreFoundation 0x00cf96f7 __CFRunLoopDoSource1 + 215
20 CoreFoundation 0x00cf6983 __CFRunLoopRun + 979
21 CoreFoundation 0x00cf6240 CFRunLoopRunSpecific + 208
22 CoreFoundation 0x00cf6161 CFRunLoopRunInMode + 97
23 GraphicsServices 0x016ec268 GSEventRunModal + 217
24 GraphicsServices 0x016ec32d GSEventRun + 115
25 UIKit 0x002cf42e UIApplicationMain + 1160
26 tipApp 0x00002888 main + 102
27 tipApp 0x00002819 start + 53
)
terminate called after throwing an instance of 'NSException'
[Session started at 2011-02-25 01:26:59 -0500.]
당신은 특별히 주위, 일부 코드를 공유해야'[tipAppViewController을 정확히] [tipAppViewController 미러]' – Ankit
당신은 당신이 문자열이나 뭐 같은 비교하려는 코드를 붙여 넣을 수 있습니다 이 코드에. – Robin