UISlider を使用してラベルの値を移動する必要があるという要件があります。私はこのコードで試しました
[slider addTarget:self action:@selector(dragMoving:withEvent:) forControlEvents: UIControlEventTouchDragInside];
- (void)dragMoving:(UIControl *)c withEvent:ev {
UITouch *touch = [[ev allTouches] anyObject];
CGPoint touchPoint = [touch locationInView:self.view];
sliderLabe.frame = CGRectMake(touchPoint.x,250, 270, 40);
}
SliderLabel はスライダーのすぐ下にありますが、速くドラッグすると奇妙な結果が得られますが、mu スライダーをゆっくり動かすと正常に動作します。