Instance Method

initWithStartDate:duration:

Initializes a date interval with a given start date and duration.

Declaration

- (instancetype)initWithStartDate:(NSDate *)startDate duration:(NSTimeInterval)duration;

Parameters

startDate

The start date of the date interval.

duration

The duration from the start date for the date interval.

Discussion

This is the designated initializer.

See Also

Creating Date Intervals

- init

Initializes a date interval by setting the start and end date to the current date.

- initWithStartDate:endDate:

Initializes a date interval from a given start date and end date.

- initWithCoder:

Returns a date interval initialized from data in the given unarchiver.