containerSize
レシーバーのバウンディングボックスのサイズを返します
解説
レシーバーのバウンディングボックスのサイズを返します。
返り値
( NSSize )
サイズ
引数
フレームワーク
ApplicationKit
クラス
NSTextContainer
Instance Methods
使用可能
10.0
参照
- textContainerInset (NSTextView)
- setContainerSize:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //myOutletはTextView NSLayoutManager *layM1; NSTextContainer *textContainer = [[NSTextContainer allocWithZone:NULL] initWithContainerSize:NSMakeSize(1.0e6, 1.0e6)]; layM1 = [myOutlet1 layoutManager]; [layM1 addTextContainer:textContainer]; NSLog([NSString stringWithFormat:@"%f,%f",[textContainer containerSize].width,[textContainer containerSize].height]); } @end