Instance Method

resolveTitleForCreateNote:withCompletion:

Resolves the title of the note.

Declaration

- (void)resolveTitleForCreateNote:(INCreateNoteIntent *)intent withCompletion:(void (^)(INSpeakableStringResolutionResult *resolutionResult))completion;

Parameters

intent

The intent object containing details about the user’s request. Use this object to get the initial information, if any, provided by the user.

completion

The handler block to execute with the resolution. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

resolutionResult

The object containing the details of your proposed resolution. For successful resolutions, create a resolution object with the title text that you intend to use for the note.

Discussion

Implement this method to resolve the title for a note. Use the intent object to obtain the title, if any, suggested by the user. The title represents the initial text that users see for the note.

If the intent does not contain title information, choose a resolution that is most appropriate for your app. If you can extract the title information from the note’s content, return a result of success with the title string you extracted. Otherwise, you can return a result of not required if you do not require a title.

See Also

Resolving the Intent Parameters

- resolveContentForCreateNote:withCompletion:

Resolves the main content of the note.

- resolveGroupNameForCreateNote:withCompletion:

Resolves the intended group of the note.