How do I place a slider value in label?
问题 I am quite new to Xcode and I am having trouble placing the value of a slider in a label when the slider is value is changed. Here is my code: Header file: @interface ViewTwoViewController : UIViewController { IBOutlet UISlider *slider; IBOutlet UILabel *sliderLabel; } -(IBAction)sliderValue:(id)sender; and here is my m file: -(IBAction)sliderValue:(UISlider *)sender { sliderLabel.text = [NSString stringWithFormat:@"%g", slider.value]; } I am not 100% sure why the value isn't updating? I am