I am fairly new to apps and Objective-C as a whole. I was creating a slider that sends it's output to a label displaying the number. Here is the code:
- (IBAction)sliderChanged:(id)sender {
UISlider *slider = (UISlider *)sender;
self.sliderText.text = [NSString stringWithFormat:@"%f", slider.value];
}
And behold the error:
2014-01-10 17:17:29.037 tapbuttonipad[64226:70b] -[NSViewController sliderChanged]: unrecognized selector sent to instance 0x8a6f450
2014-01-10 17:17:29.061 tapbuttonipad[64226:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSViewController sliderChanged]: unrecognized selector sent to instance 0x8a6f450'
The slider is linked to that block of code. I am unsure as to what I am doing wrong.
Any help is greatly appreciated.
EDIT:
Someone who answered but then deleted their answer was actually correct, and now my app does not crash. However, the app still does not update the label that it was meant to. I changed it from setting the value to just setting @"test"
, but it still did not change.
ANOTHER EDIT:
Darn, I am stupid. I had my label variable as a text field instead of a label... gah! Anyway, this is completely fixed now. Thanks everyone!