macOS/iOS API解説

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

目次

canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:

ドキュメントが未保存状態ならセーブするかの警告を出します
-(void)canCloseDocumentWithDelegate:(id)delegate:
     shouldCloseSelector:(SEL)shouldCloseSelector:
     contextInfo:(void *)contextInfo:

解説

ドキュメントが未保存状態ならセーブするかの警告を出します。

返り値

( void )

なし

引数

( id )delegate

デリゲート

( SEL )shouldCloseSelector

終了時のセレクタ

( void * )contextInfo

追加情報

フレームワーク

ApplicationKit

クラス

NSDocument

Instance Methods

使用可能

10.0

参照

- close
- saveDocument:
- shouldCloseWindowController:

例文

[self canCloseDocumentWithDelegate:self
                shouldCloseSelector:@selector(canSave)
                contextInfo:nil
                ];