init(title:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:)
Initializes a task object with the specified content and triggers.
Declaration
convenience init(title: INSpeakableString, status: INTaskStatus, taskType: INTaskType, spatialEventTrigger: INSpatialEventTrigger?, temporalEventTrigger: INTemporalEventTrigger?, createdDateComponents: DateComponents?, modifiedDateComponents: DateComponents?, identifier: String?)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.