fieldEditor:forObject:
ウインドウのフィールドエディタを返します
- (NSText *)fieldEditor:(BOOL)createWhenNeeded forObject:(id)anObjectfunc fieldEditor(_ createWhenNeeded: Bool, forObject anObject: AnyObject?) -> NSText?
解説
ウインドウのフィールドエディタを返します。フラグがYESなら、必要に応じて作成します。
フィールドエディタがなければnilを返します。
引数
フラグ
Objective-C(BOOL)createWhenNeeded
createWhenNeeded: Bool,
オブジェクト
Objective-C(id)anObject
AnyObject?
フレームワーク
ApplicationKit
クラス
NSWindow
使用可能
10.0
参照
更新時のバージョン
OS X 10.10
関連記事(外部サイト)
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSText *text = [myWindow fieldEditor:YES forObject:nil]; NSLog([text className]); } @end