Instance Method

initWithTitle:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:

Initializes a task object with the specified content and triggers.

Declaration

- (instancetype)initWithTitle:(INSpeakableString *)title status:(INTaskStatus)status taskType:(INTaskType)taskType spatialEventTrigger:(INSpatialEventTrigger *)spatialEventTrigger temporalEventTrigger:(INTemporalEventTrigger *)temporalEventTrigger createdDateComponents:(NSDateComponents *)createdDateComponents modifiedDateComponents:(NSDateComponents *)modifiedDateComponents identifier:(NSString *)identifier;

Parameters

title

The title text that describes the task. This string is what the user enters for the task details.

status

The current state of the task. Tasks can be completed or not completed.

taskType

Information about how the task behaves in your app. Use this parameter to specify whether the task can be marked as completed.

spatialEventTrigger

A location-based trigger that reminds the user to complete the task.

temporalEventTrigger

A time-based trigger that reminds the user to complete the task.

createdDateComponents

The date on which the task was initially created.

modifiedDateComponents

The last date on which the task was updated.

identifier

The unique identifier that your app uses to identify the task.

Return Value

An initialized task object or nil if the object could not be created.

See Also