convertScreenToBase:
解説
スクリーンの座標位置をウインドウの座標位置に変換して返します。
返り値
( NSPoint )
ウインドウの座標位置
引数
( NSPoint )aPoint
スクリーンの座標位置
フレームワーク
ApplicationKit
クラス
NSWindow
使用可能
10.0−10.7
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSPoint convertPoint; convertPoint = [myWindow convertScreenToBase:NSMakePoint(0.0,0.0)]; [info setStringValue:[NSString stringWithFormat:@"%.1f,%.1f",convertPoint.x,convertPoint.y]]; } @end
関連記事(外部サイト)
更新時のバージョン
OS X 10.10