简单的调谐器
导入FTGValidator.h
,然后您可以正常使用了
- (void)viewDidLoad {
[super viewDidLoad];
FTGCircularTuner *tuner = [[FTGCircularTuner alloc] init];
tuner.incompleteColor = [UIColor grayColor];
tuner.image = [UIImage imageNamed:@"volume"];
[tuner addTarget:self action:@selector(tunerDidBeginInteraction:) forControlEvents:UIControlEventEditingDidBegin];
[tuner addTarget:self action:@selector(tunerDidEndInteraction:) forControlEvents:UIControlEventEditingDidEnd];
[tuner addTarget:self action:@selector(tunerProgressChanged:) forControlEvents:UIControlEventValueChanged];
self.tuner = tuner;
[self.view addSubview:tuner];
}
- (void)tunerDidBeginInteraction:(id)sender {
NSLog(@"begin");
}
- (void)tunerDidEndInteraction:(id)sender {
NSLog(@"end");
}
- (void)tunerProgressChanged:(FTGCircularTuner *)tuner {
NSLog(@"progress %f", tuner.progress);
}
本项目基于MIT许可证发布。请参阅LICENSE.md