macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

parentWindow

INDEX>AppKit>NSDrawer

引き出しの親ウインドウを返します

Objective-C

@property(assign) NSWindow *parentWindow

Swift

unowned(unsafe) var parentWindow: NSWindow?

解説

引き出しの親ウインドウを返します。

設定値

ウインドウ
Objective-C

@property(assign) NSWindow *parentWindow

Swift

unowned(unsafe) var parentWindow: NSWindow?

フレームワーク

ApplicationKit

クラス

NSDrawer

使用可能

10.0

参照

- setParentWindow:

更新時のバージョン

OS X 10.10.2

関連記事(外部サイト)

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction1:(id)sender
{
[drawer open];

NSLog([[drawer parentWindow] title]);
}

- (IBAction)myAction2:(id)sender
{
[drawer close];
}

@end