macOS/iOS API解説

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

目次

windowNibPath

ウインドウコントローラのnibファイルのフルパスを返します

解説

ウインドウコントローラのnibファイルのフルパスを返します。

返り値

( NSString * )

パス

引数

フレームワーク

ApplicationKit

クラス

NSWindowController

Class Methods

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
//MyControllerはNSWindowControllerのサブクラス
MyController *contoroller = [[sender window] windowController];

NSLog([contoroller windowNibName]);
NSLog([contoroller windowNibPath]);

[contoroller showWindow:nil];

if ([contoroller isWindowLoaded]){
NSLog(@"YES");
}else{
NSLog(@"NO");
}

NSLog([[contoroller window] title]);

[contoroller setWindow:otherWindow];
[contoroller showWindow:nil];

NSLog([[contoroller document] className]);

//[contoroller close];

if ([contoroller shouldCloseDocument]){
NSLog(@"YES");
}else{
NSLog(@"NO");
}

NSLog([[contoroller owner] className]);

[contoroller setShouldCascadeWindows:NO];

if ([contoroller shouldCascadeWindows]){
NSLog(@"YES");
}else{
NSLog(@"NO");
}

[contoroller setWindowFrameAutosaveName:@"windowName"];
NSLog([contoroller windowFrameAutosaveName]);

[contoroller synchronizeWindowTitleWithDocumentName];

NSLog([contoroller windowNibPath]);
}

@end