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 EKTypes.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. In OS X Mountain Lion, you can specify an action to trigger when the alarm fires via the emailAddress, soundName, or url property.
Tasks
Creating an Alarm
Accessing Alarm Dates
-
absoluteDateproperty -
relativeOffsetproperty
Setting GeoFence-based Alarms
-
structuredLocationproperty -
proximityproperty
Properties
absoluteDate
The absolute date for the alarm.
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.hproximity
A value indicating how a location-based alarm is triggered.
Discussion
Alarms can be set to trigger when entering or exiting a location specified by structuredLocation. By default, alarms are not affected by location.
Availability
- Available in iOS 6.0 and later.
See Also
Declared In
EKAlarm.hrelativeOffset
The offset from the start of an event, at which the alarm fires.
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.hstructuredLocation
The location to trigger an alarm.
Discussion
This property is used in conjunction with proximity to perform geofence-based triggering of reminders.
Availability
- Available in iOS 6.0 and later.
Declared In
EKAlarm.hClass Methods
alarmWithAbsoluteDate:
Creates and returns an alarm with an absolute date.
Parameters
- date
The date for the alarm.
Return Value
The created alarm.
Availability
- Available in iOS 4.0 and later.
Declared In
EKAlarm.halarmWithRelativeOffset:
Creates and returns an alarm with a relative offset.
Parameters
- offset
The offset from the start of an event, at which the alarm fires.
Return Value
The created alarm.
Discussion
Negative offset values fire before the start of the event, while positive values fire after the start.
Availability
- Available in iOS 4.0 and later.
Declared In
EKAlarm.hConstants
EKAlarmProximity
A value indicating whether an alarm is triggered by entering or exiting a region.
typedef enum {
EKAlarmProximityNone,
EKAlarmProximityEnter,
EKAlarmProximityLeave,
} EKAlarmProximity;
Constants
EKAlarmProximityNoneThe alarm has no proximity trigger.
Available in iOS 6.0 and later.
Declared in
EKTypes.h.EKAlarmProximityEnterThe alarm is set to fire when entering a region.
Available in iOS 6.0 and later.
Declared in
EKTypes.h.EKAlarmProximityLeaveThe alarm is set to fire when leaving a region.
Available in iOS 6.0 and later.
Declared in
EKTypes.h.
Availability
- Available in iOS 6.0 and later.
Declared In
EKTypes.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-07-17)