indexOfTickMarkAtPoint:
指定した点に最も近いチックマークの番号を返します
-(int)indexOfTickMarkAtPoint:(NSPoint)point:
解説
指定した点に最も近いチックマークの番号を返します。
バウンディングボックスの中で、点がなければNSNotFoundを返します。
返り値
( int )
整数値
引数
( NSPoint )point
位置
フレームワーク
ApplicationKit
クラス
NSSliderCell
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { int ret; ret = [slider indexOfTickMarkAtPoint:NSMakePoint(10,10)]; if (ret==NSNotFound){ NSLog(@"NSNotFound"); }else{ NSLog([NSString stringWithFormat:@"%d",ret]); } } - (IBAction)slide:(id)sender { } @end