Instance Method インスタンスメソッド

initWithMarkdown:options:baseURL:error:

Creates an attributed string from Markdown-formatted data using the provided options. ある属性付き文字列を作成します、Markdown書式設定されたデータから、この提供されたオプションを使って。

Declaration 宣言

- (instancetype)initWithMarkdown:(NSData *)markdown 
                         options:(NSAttributedStringMarkdownParsingOptions *)options 
                         baseURL:(NSURL *)baseURL 
                           error:(NSError * _Nullable *)error;

Parameters パラメータ

markdown

The NSData instance that contains the Markdown formatting. Markdown書式設定を含むNSDataインスタンス。

options オプション

Options that affect how the initializer interprets formatting in the Markdown string. This parameter defaults to no options. どのようにイニシャライザがMarkdown文字列における書式設定を解釈するかに影響を及ぼすオプション。このパラメータは省略時にはオプション無しになります。

baseURL

The base URL to use when resolving Markdown URLs. The initializer treats URLs as being relative to this URL. If this value is nil, the initializer doesn’t resolve URLs. The default is nil. Markdown URLを解決するときに使う基底URL。イニシャライザは、URLをこのURLに相対的であるとみなします。この値がnilならば、イニシャライザはURLを分析しません。省略時にはnilです。

error

On input, a pointer to an error object. On return, if an error occurs, this pointer contains an actual error object with the error information. You may specify nil for this parameter if you don’t want the error information. 入力では、エラーオブジェクトへのポインタ。戻りでは、エラーが発生するならば、このポインタはエラー情報を備える実際のエラーオブジェクトを含みます。あなたは、nilをこのパラメータに対して指定するかもしれません、もしあなたがエラー情報を望まないならば。

Return Value 戻り値

An attributed string with the parsed Markdown text and styling, or nil if parsing the data fails. 構文解析されたMarkdownテキストとスタイル指定での属性付き文字列、またはnil、もしデータの構文解析が失敗するならば。

See Also 参照

Creating an Attributed String from Markdown 属性付き文字列をMarkdownから作成する