现在的位置: 首页 > 综合 > 正文

UISlider用法(1)

2013年07月12日 ⁄ 综合 ⁄ 共 384字 ⁄ 字号 评论关闭

@property (strong, nonatomic) IBOutlet UISlider *zoomSelector;

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

- (IBAction)changeSliderValue:(id)sender;

@synthesize zoomSelector;

@synthesize testLabel;

- (IBAction)changeSliderValue:(id)sender 

   
int coefficient =
zoomSelector
.value;

   
float testLabelValue =
0.1
* zoomCoefficient;

   
testLabel.text = [NSString
stringWithFormat:@"%.1f",testLabelValue];

}

抱歉!评论已关闭.