macOS/iOS API解説

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

目次

NSDocumentControllerクラス

INDEX>AppKit> NSDocumentController

**

継承 NSObject
NSObject
NSDocumentController
準拠 NSObject (NSObject)
NSCoding
NSObject
NSUserInterfaceValidations
フレームワーク /System/Library/Frameworks/AppKit.framework
使用可能 OS X 10.0以降
定義
インポート文 @import AppKit;

概要

メソッドとプロパティ

Obtaining the Shared Document Controller

+ sharedDocumentController

Initializing a New NSDocumentController

- init
Designated Initializer

Creating and Opening Documents

- documentForURL:
- duplicateDocumentWithContentsOfURL:copying:displayName:error:
- openDocumentWithContentsOfURL:display:completionHandler:
- openUntitledDocumentAndDisplay:error:
- makeDocumentForURL:withContentsOfURL:ofType:error:
- makeDocumentWithContentsOfURL:ofType:error:
- makeUntitledDocumentOfType:error:
- reopenDocumentForURL:withContentsOfURL:display:completionHandler:

Managing Documents

documents
- addDocument:
currentDocument
- documentForWindow:
hasEditedDocuments
- removeDocument:

Managing Document Types

documentClassNames
- defaultType
- documentClassForType:
- displayNameForType:
- typeForContentsOfURL:error:

Autosaving

autosavingDelay

Closing Documents

- closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:
- reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:

Responding to Action Messages

- newDocument:
- openDocument:
- saveAllDocuments:

Managing the Open Dialog

- beginOpenPanelWithCompletionHandler:
- beginOpenPanel:forTypes:completionHandler:
- runModalOpenPanel:forTypes:
currentDirectory
URLsFromRunningOpenPanel
Available in OS X v10.10 through OS X v10.10.3 Property

Managing the Open Recent Menu

maximumRecentDocumentCount
- clearRecentDocuments:
- noteNewRecentDocumentURL:
- noteNewRecentDocument:
recentDocumentURLs

Validating User Interface Items

- validateUserInterfaceItem:

Handling Errors

- presentError:
- presentError:modalForWindow:delegate:didPresentSelector:contextInfo:
- willPresentError:

Deprecated Methods

- documentForFileName:
(OS X v10.4)
- fileExtensionsFromType:
(OS X v10.5)
- fileNamesFromRunningOpenPanel
(OS X v10.4)
- makeUntitledDocumentOfType:
(OS X v10.4)
- makeDocumentWithContentsOfURL:ofType:
(OS X v10.4)
- makeDocumentWithContentsOfFile:ofType:
(OS X v10.4)
- openDocumentWithContentsOfFile:display:
(OS X v10.4)
- openDocumentWithContentsOfURL:display:
(OS X v10.4)
- openDocumentWithContentsOfURL:display:error:
(OS X v10.7)
- openUntitledDocumentOfType:display:
(OS X v10.4)
- reopenDocumentForURL:withContentsOfURL:error:
(OS X v10.7)
- setShouldCreateUI:
(OS X v10.4)
- shouldCreateUI
(OS X v10.4)
- typeFromFileExtension:
(OS X v10.5)



定数

参照

更新時バージョン

OS X 10.11