@interface UIStepper : UIControl
@property(nonatomic,getter=isContinuous) BOOL continuous; // if YES, value change events are sent any time the value changes during interaction. default = YES
@property(nonatomic) BOOL autorepeat; // if YES, press & hold repeatedly alters value. default = YES
@property(nonatomic) BOOL wraps; // if YES, value wraps from min <-> max. default = NO
@property(nonatomic) double value; // default is 0. sends UIControlEventValueChanged. clamped to min/max
@property(nonatomic) double minimumValue; // default 0. must be less than maximumValue
@property(nonatomic) double maximumValue; // default 100. must be greater than minimumValue
@property(nonatomic) double stepValue; // default 1. must be greater than 0
@property(nonatomic,retain) UIColor *tintColor NS_AVAILABLE_IOS(6_0);
step = [[UIStepper alloc]initWithFrame:CGRectMake(111, 111, 111, 111)];
[self.view addSubview:step];
[step addTarget:self action:@selector(shishi) forControlEvents:UIControlEventValueChanged];
step.autorepeat = NO; // 按住是否持续增加
step.wraps = NO; // 是否在最小
step.minimumValue = 10;
step.maximumValue = 50;
step.stepValue = 5;
step.tintColor = [UIColor greenColor];
// 可用时的背景,不可用的+ - 是没有图片的
- (void)setBackgroundImage:(UIImage*)image forState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
- (UIImage*)backgroundImageForState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
// 中间的图片,貌似没什么软用
- (void)setDividerImage:(UIImage*)image forLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
- (UIImage*)dividerImageForLeftSegmentState:(UIControlState)state rightSegmentState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
// 加号的图片修改
- (void)setIncrementImage:(UIImage *)image forState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
- (UIImage *)incrementImageForState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
// 减号的图片
- (void)setDecrementImage:(UIImage *)image forState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
- (UIImage *)decrementImageForState:(UIControlState)state NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
@end