cellSizeForBounds:
範囲からセルサイズを返します
-(NSSize)cellSizeForBounds:(NSRect)aRect:
解説
範囲からセルサイズを返します。セルのタイプによってサイズが違います。
返り値
( NSSize )
サイズ
引数
( NSRect )aRect
範囲
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
- drawingRectForBounds:
例文
NSSize theSize = [super cellSizeForBounds:aRect]; // #import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSSize siz = [bCell1 cellSizeForBounds:NSMakeRect(0,0,100,100)]; NSLog([NSString stringWithFormat:@"w=%.1f,h=%.1f",siz.width,siz.height]); } @end