-3
2015-02-03 22:44:17.468 descuentos[1430:55158] -[UIButton value]: unrecognized selector sent to instance 0x7fde78d95440
2015-02-03 22:44:17.472 descuentos[1430:55158] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton value]: unrecognized selector sent to instance 0x7fde78d95440'
*** First throw call stack:
어떻게이 오류를 해결할 수 있습니까? 나는 이것이 스레드 오류라고 생각한다. 당신이 UISlider를 사용하도록 구성 할 때 당신이있는 UIButton에서 IBAction를 연결 한 것처럼내 코드 'NSInvalidArgumentException'에서이 오류가 발생합니다.
- (IBAction)TipsSlider:(id)sender {
UISlider *slider = sender;
float valorFloat = slider.value;
int valInt = (int)valorFloat;
_dataSlider.text = [[NSString alloc]initWithFormat:@"%d", valInt];
}
- (IBAction)calcular:(id)sender {
UISlider *slider = sender;
float valorFloat = slider.value;
int valInt = (int)valorFloat;
_dataSlider.text = [[NSString alloc]initWithFormat:@"%d", valInt];
float valorIn= [[entrada text] floatValue];
float resultado = (valorFloat/100) * valorIn;
NSString *resultadoFinal = [[NSString alloc]initWithFormat:@"%4.2f",resultado];
_salidaResultado.text = resultadoFinal;
}
스택 오버플로에 오신 것을 환영합니다! [My App crashed. 지금 뭐야?] (http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1) – NobodyNada
아마도 UIButtons에 콘센트를 연결 했었을 것입니다. 그리고 그것을 클릭하면 응용 프로그램이 충돌합니다. 그 변환 때문에. –