widthTracksTextView
レシーバーが幅を調節するかを返します
解説
レシーバーが幅を調節するかを返します。
返り値
( BOOL )
YES/NO
引数
フレームワーク
ApplicationKit
クラス
NSTextContainer
Instance Methods
使用可能
10.0
参照
- heightTracksTextView
- setWidthTracksTextView:
例文
#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]; [textContainer setWidthTracksTextView:YES]; ([textContainer widthTracksTextView]) ? NSLog(@"YES") : NSLog(@"NO"); } @end