slider

 

/*获取slider值 events:ValueChanged

*

*@property (strong, nonatomic) IBOutlet UILabel *numberSlider;

*

*/

- (IBAction)sliderChanger:(id)sender {

    UISlider *slider = (UISlider *)sender; 

    int value = (int)roundf(slider.value);  

    numberSlider.text = [NSString stringWithFormat:@"%d",value];

}

 

你可能感兴趣的:(ios,slider)