macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

stopTracking:at:inView:mouseIsUp:

マウストラック終了で呼び出されます
-(void)stopTracking:(NSPoint)lastPoint:
          at:(NSPoint)stopPoint:
          inView:(NSView *)controlView:
          mouseIsUp:(BOOL)flag:

解説

マウストラック終了で呼び出されます。

返り値

( void )

なし

引数

( NSPoint )lastPoint

最終の位置

( NSPoint )stopPoint

終了点

( NSView * )controlView

ビュー

( BOOL )flag

フラグ

フレームワーク

ApplicationKit

クラス

NSCell

Instance Methods

使用可能

10.0

参照

- startTrackingAt:inView:
- stopTracking:at:inView:mouseIsUp:

例文

#import "MyButtonCell.h"

@implementation MyButtonCell
//トラック開始
- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView
{
NSLog([NSString stringWithFormat:@"x=%.1f,y=%.1f",startPoint.x,startPoint.y]);
return YES;
}
//トラック継続中
- (BOOL)continueTracking:(NSPoint)lastPoint at:(NSPoint)currentPoint inView:(NSView *)controlView
{
return YES;
}
//トラック終了

- (BOOL)stopTracking:(NSPoint)lastPoint 
                    at:(NSPoint)stopPoint
                    inView:(NSView *)controlView
                    mouseIsUp:(BOOL)flag
{
NSLog([NSString stringWithFormat:@"x=%.1f,y=%.1f",lastPoint.x,lastPoint.y]);
return YES;
}

@end