UISlider* slider = [[UISlider alloc] initWithFrame:CGRectMake(20, 400, 280, 30)];
//最小值
slider.minimumValue = 100;
//最大值
slider.maximumValue = 300;
//当前值
slider.value = 100;
//事件
[slider addTarget:self action:@selector(slider:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:slider];
- (void)slider:(UISlider*)slider{
//slider.value
}