titleRectForBounds:
タイトルの範囲を返します
-(NSRect)titleRectForBounds:(NSRect)theRect:
解説
タイトルの範囲を返します。セルがテキストタイプセルでなければ、何もしません。
返り値
( NSRect )
範囲
引数
( NSRect )theRect
範囲
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
- imageRectForBounds:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSRect rec = [bCell1 titleRectForBounds:NSMakeRect(0,0,100,100)]; NSLog([NSString stringWithFormat:@"x=%.1f,y=%.1fw=%.1f,h=%.1f",rec.origin.x,rec.origin.y,rec.size.width,rec.size.height]); } @end