1.创建对象
UIStepper *stepper = [[UIStepper alloc]initWithFrame:CGRectMake(100, 400, 100, 30)];
2.设置背景颜色
stepper.backgroundColor=[UIColor blueColor];
3.自定义触发事件
[stepper addTarget:self action:@selector(stepAction:) forControlEvents:UIControlEventValueChanged];
4.设置最小值
[stepper setMinimumValue:0];
5.设置最大值
[stepper setMaximumValue:100];
6.设置递增量
stepper.stepValue=20;
7.设置循环
[stepper setWraps:YES];
8.设置连续递加减
[stepper setContinuous:YES];
9.添加视图上
[self.imageView addSubview:stepper];
10.释放
[stepper release];