init(timeInterval:repeats:)
Creates a time interval trigger using the time value parameter.
Declaration
convenience init(timeInterval: TimeInterval, repeats: Bool)Parameters
- timeInterval:
The time (in seconds) that must elapse from the current time before the trigger fires. This value must be greater than zero.
- repeats:
Specify False to deliver the notification one time. Specify True to reschedule the notification request each time the system delivers the notification. If this parameter is True, the value in the
timeIntervalparameter must be 60 seconds or greater.
Return Value
A new time interval trigger based on the specified temporal information.
Discussion
If you specify true for the repeats parameter, you must explicitly remove the notification request to stop the delivery of the associated notification. Use the methods of UNUserNotificationCenter to remove notification requests that are no longer needed.