2010-12-17 5 views
4

SDK4.2로 iPad 응용 프로그램을 개발 중입니다. 내 응용 프로그램에서 textField를 만질 때 매우 이상한 오류가 발생했습니다. 처음 만졌을 때 키보드가 보이지만 두 번째 터치가 객체에서 끝나면 다음 추적을 얻습니다. 그리고 UIWebView 객체가있는 HTML 페이지에 표시된 모든 TextField에서도 발생합니다. 아이디어가 있으십니까? 나는 이것과 정말로 혼동된다. 미리 감사드립니다!어설 션 실패

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' 

답변

3

예외가 무엇인지주의 깊게보십시오. 그것은 "이유 : '유효하지 않은 매개 변수가 만족스럽지 않습니다 : 색상' ', 코드 어딘가에 유효 색상으로 간주되는 잘못된 매개 변수를 제공합니다. 분명히, UIButton을 라벨과 함께 사용하고 색상을 설정했지만 유효하지 않은 것처럼 보입니다.

0

내 생각에 어딘가에 어떤 물체가 사라지고 그 개체에 "색"값이 포함되어있는 것 같습니다.

대부분의 호출에서 자동 변환 된 값을 받았고이를 유지하지 않았으므로 UI가 방송 중일 때 "좋지"않았습니다.