NSLocalizedString应用程序在运行期间崩溃

时间:2011-06-10 11:26:34

标签: iphone

我在注册页面上创建一个包含大量标签和文本值等的应用程序 没有本地化我的应用程序工作完美但在做本地化后我得到错误

-[UILabel charValue]: unrecognized selector sent to instance 0x765b980  
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILabel charValue]: unrecognized selector sent to instance 0x765b980'  

* 第一次投掷时调用堆栈:   (

0   CoreFoundation                      0x02aa7b99 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x02bf740e objc_exception_throw + 47
2   CoreFoundation                      0x02aa96ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x02a192b6 ___forwarding___ + 966
4   CoreFoundation                      0x02a18e72 _CF_forwarding_prep_0 + 50
5   Foundation                          0x001ebc2c _NSSetCharValueForKeyInIvar + 68
6   Foundation                          0x00157152 _NSSetUsingKeyValueSetter + 230
7   Foundation                          0x00157061 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
8   UIKit                               0x005d570a -[UIRuntimeOutletConnection connect] + 112
9   CoreFoundation                      0x02a1dded -[NSArray makeObjectsPerformSelector:] + 461
10  UIKit                               0x005d4121 -[UINib instantiateWithOwner:options:] + 1041
11  UIKit                               0x005d5eb5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
12  UIKit                               0x0048b95f -[UIViewController _loadViewFromNibNamed:bundle:] + 70
13  UIKit                               0x00489675 -[UIViewController loadView] + 120
14  UIKit                               0x0048954f -[UIViewController view] + 56
15  UIKit                               0x004879f4 -[UIViewController contentScrollView] + 42
16  UIKit                               0x004977e2 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
17  UIKit                               0x00495ea3 -[UINavigationController _layoutViewController:] + 43
18  UIKit                               0x0049712d -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
19  UIKit                               0x00491ccd -[UINavigationController _startDeferredTransitionIfNeeded] + 266
20  UIKit                               0x00498d8b -[UINavigationController pushViewController:transition:forceImmediate:] + 876
21  UIKit                               0x00491b67 -[UINavigationController pushViewController:animated:] + 62
22  Buzzador                            0x000039b8 -[BuzzadorViewController newuserBtnPressed] + 146
23  UIKit                               0x003df7f8 -[UIApplication sendAction:to:from:forEvent:] + 119
24  UIKit                               0x0046ade0 -[UIControl sendAction:to:forEvent:] + 67
25  UIKit                               0x0046d262 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
26  UIKit                               0x0046c053 -[UIControl touchesBegan:withEvent:] + 277
27  UIKit                               0x00403324 -[UIWindow _sendTouchesForEvent:] + 395
28  UIKit                               0x003e4cb4 -[UIApplication sendEvent:] + 447
29  UIKit                               0x003e99bf _UIApplicationHandleEvent + 7672
30  GraphicsServices                    0x030d0822 PurpleEventCallback + 1550
31  CoreFoundation                      0x02a88ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
32  CoreFoundation                      0x029e9807 __CFRunLoopDoSource1 + 215
33  CoreFoundation                      0x029e6a93 __CFRunLoopRun + 979
34  CoreFoundation                      0x029e6350 CFRunLoopRunSpecific + 208
35  CoreFoundation                      0x029e6271 CFRunLoopRunInMode + 97
36  GraphicsServices                    0x030cf00c GSEventRunModal + 217
37  GraphicsServices                    0x030cf0d1 GSEventRun + 115
38  UIKit                               0x003edaf2 UIApplicationMain + 1160
39  Buzzador                            0x00002610 main + 102
40  Buzzador                            0x000025a1 start + 53

) 抛出'NSException'实例后调用终止

所有其他完美的本地化工作都接受此注册。

请帮帮我

2 个答案:

答案 0 :(得分:0)

也许你的意思是 - [UILabel文字]而不是 - [UILabel charValue]?

答案 1 :(得分:0)

我找到解决方案..我删除了所有未使用的变量..它工作正常...
thanx to all