Interface Builder の属性インスペクターに記載されている UISlider の最大値と最小値を読み取る方法はありますか? これらの値を UIView 内の X 座標の範囲として使用したいのですが、その方法がわかりません。
- (IBAction)sineXYPad:(UIPanGestureRecognizer *)trigger {
float sinepadHeight = sinexyview.bounds.size.height;
float sinepadWidth = sinexyview.bounds.size.width;
CGPoint location = [trigger locationInView:sinexyview];
if ((location.y >= 0) && (location.y < sinepadHeight) && (location.x >= 0) && (location.x < sinepadWidth)) {
float maxX = sinePSlider.maximumValue;
float minX = sinePSlider.minimumValue;
float sinePitchXY = (location.x > minX) && (location.x < maxX);
sinePSlider.value = sinePitchXY;
[PdBase sendFloat:sinePitchXY toReceiver:@"sine_pitch"];
}
}
ここに私のUIがあります: