macOS/iOS API解説

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

目次

makeDocumentWithContentsOfFile:ofType:

ファイル名とドキュメントタイプで文書を作ります
-(id)makeDocumentWithContentsOfFile:(NSString *)fileName:
             ofType:(NSString *)docType:

解説

ファイル名とドキュメントタイプで文書を作ります。

返り値

( id )

ドキュメントオブジェクト(NSDozument)

引数

( NSString * )fileName

ファイル名

( NSString * )docType

ドキュメントタイプ

フレームワーク

ApplicationKit

クラス

NSDocumentController

Instance Methods

使用可能

10.0

参照

- makeUntitledDocumentOfType:
- openDocument:

例文

    doc2 = [dController2  makeDocumentWithContentsOfFile:[opPanel filename]
                        ofType:@"txt"
                        ];