iOS Reference Library Apple Developer
Search

EKAlarm Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/EventKit.framework
Availability
Available in iOS 4.0 and later.
Companion guide
Declared in
EKAlarm.h

Overview

An EKAlarm object represents an alarm in Event Kit. Use the alarmWithAbsoluteDate: and alarmWithRelativeOffset: class methods to create an alarm and use the properties to set information about an alarm.

Tasks

Creating an Alarm

Accessing Alarm Properties

Properties

For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.

absoluteDate

The absolute date for the alarm.

@property(copy) NSDate *absoluteDate

Discussion

If you set this property for a relative offset alarm, it loses the relative offset and becomes an absolute alarm.

Availability
  • Available in iOS 4.0 and later.
Declared In
EKAlarm.h

relativeOffset

The offset from the start of an event, at which the alarm fires.

@property NSTimeInterval relativeOffset

Discussion

If you set this value for an absolute alarm, it loses its absolute date and becomes a relative offset alarm.

Availability
  • Available in iOS 4.0 and later.
Declared In
EKAlarm.h

Class Methods

alarmWithAbsoluteDate:

Creates and returns an alarm with an absolute date.

+ (EKAlarm *)alarmWithAbsoluteDate:(NSDate *)date

Parameters
date

The date for the alarm.

Return Value

The created alarm.

Availability
  • Available in iOS 4.0 and later.
Declared In
EKAlarm.h

alarmWithRelativeOffset:

Creates and returns an alarm with a relative offset.

+ (EKAlarm *)alarmWithRelativeOffset:(NSTimeInterval)offset

Parameters
offset

The offset from start of an event, at which the alarm fires. Should be a negative value or 0.

Return Value

The created alarm.

Discussion

If offset is greater than zero, it is pinned to zero.

Availability
  • Available in iOS 4.0 and later.
Declared In
EKAlarm.h



Last updated: 2010-03-25

Did this document help you? Yes It's good, but... Not helpful...