convertSize:fromView:
別のビューの座標をレシーバの座標へ変換してNSSizeを返します
-(NSSize)convertSize:(NSSize)aSize:
fromView:(NSView *)aView:
解説
別のビュー(aView)の座標をレシーバの座標へ変換してNSSizeを返します。
別のビュー(aView)がnilなら、ウインドウの座標になります。
別のビュー(aView)とレシーバーは、同じNSWindowにないといけません。
返り値
( NSSize )
aViewのレシーバでのサイズ
引数
( NSSize )aSize
変換元のサイズ
( NSView * )aView
変換元のビュー
フレームワーク
ApplicationKit
クラス
NSView
Instance Methods
使用可能
10.0
参照
- convertPoint:fromView:
- convertRect:fromView:
- ancestorSharedWithView:
- contentView (NSWindow)
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { [info setIntValue:[sender convertSize:NSMakeSize(10.0,10.0) fromView:nil].width]; } @end