我正在使用SDK4.2开发iPad应用程序。在触摸应用程序中的任何Textfield时,我有一个非常奇怪的错误。我第一次触摸时,显示了键盘,但是当我获得以下跟踪的对象中完成第二次触摸时。它也发生在带有UIWebView对象的HTML页面中显示的任何文本字段中。有任何想法吗?我真的很困惑。

2010-12-17 11:53:11.697 BancoPopular[48914:207] *** Assertion failure in -[UIButtonLabel setTextColor:], /SourceCache/UIKit_Sim/UIKit-1447.6.4/UILabel.m:314
2010-12-17 11:53:11.699 BancoPopular[48914:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: color'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x01730be9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x018855c2 objc_exception_throw + 47
    2   CoreFoundation                      0x016e9628 +[NSException raise:format:arguments:] + 136
    3   Foundation                          0x0013947b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
    4   UIKit                               0x0045d1dc -[UILabel setTextColor:] + 164
    5   UIKit                               0x0052177b -[UIButton layoutSubviews] + 1337
    6   UIKit                               0x005f3420 -[UICalloutBarButton layoutSubviews] + 54
    7   QuartzCore                          0x011a4451 -[CALayer layoutSublayers] + 181
    8   QuartzCore                          0x011a417c CALayerLayoutIfNeeded + 220
    9   QuartzCore                          0x011a4088 -[CALayer layoutIfNeeded] + 111
    10  UIKit                               0x0051f2ff -[UIButton titleLabel] + 81
    11  UIKit                               0x005f81d1 -[UICalloutBarButton setContentScale:] + 141
    12  UIKit                               0x005f6c5d -[UICalloutBar _updateVisibleItems] + 2240
    13  UIKit                               0x005f2970 -[UICalloutBar appear] + 211
    14  UIKit                               0x005eaaa9 -[UITextSelectionView showCommandsWithReplacements:] + 291
    15  Foundation                          0x000bd7f6 __NSFireDelayedPerform + 441
    16  CoreFoundation                      0x01711fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
    17  CoreFoundation                      0x01713594 __CFRunLoopDoTimer + 1220
    18  CoreFoundation                      0x0166fcc9 __CFRunLoopRun + 1817
    19  CoreFoundation                      0x0166f240 CFRunLoopRunSpecific + 208
    20  CoreFoundation                      0x0166f161 CFRunLoopRunInMode + 97
    21  GraphicsServices                    0x01e25268 GSEventRunModal + 217
    22  GraphicsServices                    0x01e2532d GSEventRun + 115
    23  UIKit                               0x0034d42e UIApplicationMain + 1160
    24  BancoPopular                        0x0000292e main + 84
    25  BancoPopular                        0x000028d1 start + 53
    26  ???                                 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
有帮助吗?

解决方案

仔细看,有什么例外。它说:“原因:'无效参数不满意:颜色'”,在代码中的某个地方,您提供了错误的参数,应该是有效的颜色。显然,似乎您将Uibutton与标签使用并设置其颜色但无效。

其他提示

我的猜测是,您有一些对象移开某个地方,该对象包含“颜色”值。

您很可能会从某些电话中收到自我发行的价值,并且没有保留它,因此当UI升起播出时,它会“ po”。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top