Class: EKCalendarItem

Inherits:
EKObject show all

Overview

The EKCalendarItem class is a an abstract superclass for calendar events and reminders. This class provides common properties and methods for accessing properties of calendar items such as the ability to set the calendar, title, and location as well as support for attaching notes, displaying attendees, setting multiple alarms, and specifying recurrence rules.

Direct Known Subclasses

EKEvent, EKReminder

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from EKObject

#hasChanges, #isNew, #refresh, #reset, #rollback

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Array) alarms

The alarms associated with the calendar item, as an array of EKAlarm objects. This property is nil if the calendar item has no alarms.

Returns:

- (Array) attendees (readonly)

The attendees associated with the calendar item, as an array of EKParticipant objects. (read-only) This property is read-only; it is not possible to add attendees with Event Kit. This property is nil if the calendar item has no attendees.

Returns:

- (EKCalendar) calendar

The calendar for the calendar item.

Returns:

- (String) calendarItemExternalIdentifier (readonly)

The calendar item’s external identifier as provided by the calendar server. (read-only) This identifier allows you to access the same event or reminder across multiple devices.There are some cases where duplicate copies of a calendar item can exist in the same database:A calendar item was imported from an ICS file into multiple calendarsAn event was created in a calendar shared with the user and the user was also invited to the eventThe user is a delegate of a calendar that also has this eventA subscribed calendar was added to multiple accountsIn such cases, you should choose between calendar items based on other factors, such as the calendar or source.Recurring event identifiers are the same for all occurrences. If you wish to differentiate between occurrences, you may want to use the start date.For Exchange servers, the identifier is different between iOS and OS X and different between devices for reminders.

Returns:

- (String) calendarItemIdentifier (readonly)

The calendar item’s unique identifier. (read-only) This property is set when the calendar item is created and can be used as a local identifier. Use calendarItemWithIdentifier: to look up the item by this value.A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetch-able by caching its other properties.

Returns:

- (NSDate) creationDate (readonly)

The date that this calendar item was created. (read-only) If nil, this property was not set or was synced in this state.

Returns:

- (Boolean) hasAlarms (readonly)

A Boolean value that indicates whether the calendar item has alarms. (read-only) If YES, the calendar item has alarms; otherwise it does not.

Returns:

  • (Boolean)

- (Boolean) hasAttendees (readonly)

A Boolean value that indicates whether the calendar item has attendees. (read-only) If YES, the calendar item has attendees; otherwise it does not.

Returns:

  • (Boolean)

- (Boolean) hasNotes (readonly)

A Boolean value that indicates whether the calendar item has notes. (read-only) If YES, the calendar item has notes; otherwise it does not.

Returns:

  • (Boolean)

- (Boolean) hasRecurrenceRules (readonly)

A Boolean value that indicates whether the calendar item has recurrence rules. (read-only) If YES, the calendar item has recurrence rules; otherwise it does not.

Returns:

  • (Boolean)

- (NSDate) lastModifiedDate (readonly)

The date that the calendar item was last modified. (read-only)

Returns:

- (String) location

The location associated with the calendar item. This property is nil if the calendar item has no location.

Returns:

- (String) notes

The notes associated with the calendar item.

Returns:

- (Array) recurrenceRules

The recurrence rules for the calendar item.

Returns:

- (NSTimeZone) timeZone

The time zone for the calendar item. If nil, the calendar item is a floating event. A floating event is not tied to a particular time zone. It occurs at a given time regardless of the time zone — for example, “lunch at noon.” The start and end times of a floating event should be set as if they were in the system time zone.

Returns:

- (String) title

The title for the calendar item.

Returns:

- (NSURL) URL

The URL for the calendar item.

Returns:

Instance Method Details

- (Object) addAlarm(alarm)

Adds an alarm to the receiver.

Parameters:

  • alarm (EKAlarm)

    The alarm to be added.

Returns:

- (Object) addRecurrenceRule(rule)

Adds a recurrence rule to the recurrence rule array.

Parameters:

Returns:

- (Object) removeAlarm(alarm)

Removes an alarm from the calendar item.

Parameters:

  • alarm (EKAlarm)

    The alarm to be removed.

Returns:

- (Object) removeRecurrenceRule(rule)

Removes a recurrence rule from the recurrence rule array.

Parameters:

Returns: