我声明像这样的滑块动作
[self.slider addTarget:self.delegate action:@selector(sliderChanged:) forControlEvents:UIControlEventValueChanged];
现在,在委托中,我想要改变价值。
- (void)sliderChanged:(id)sender
{
UIView *senderView = [sender view];
NSLog(@"Slider Changed: %f", slider.value);
我无法得到它
答案 0 :(得分:1)
尝试使用
- (void)sliderChanged:(UISlider *)sender
{
NSLog(@"Slider Changed: %f", sender.value);
}