Documentation Archive Developer
Search

EventKitUI Changes for Swift

EventKitUI

Removed EKCalendarChooserDisplayStyle [struct]
Removed EKCalendarChooserDisplayStyle.init(_: UInt32)
Removed EKCalendarChooserDisplayStyle.value
Removed EKCalendarChooserSelectionStyle [struct]
Removed EKCalendarChooserSelectionStyle.init(_: UInt32)
Removed EKCalendarChooserSelectionStyle.value
Removed EKEventEditViewAction [struct]
Removed EKEventEditViewAction.init(_: UInt32)
Removed EKEventEditViewAction.value
Removed EKEventViewAction [struct]
Removed EKEventViewAction.init(_: UInt32)
Removed EKEventViewAction.value
Removed EKCalendarChooserDisplayAllCalendars
Removed EKCalendarChooserDisplayWritableCalendarsOnly
Removed EKCalendarChooserSelectionStyleMultiple
Removed EKCalendarChooserSelectionStyleSingle
Removed EKEventEditViewActionCanceled
Removed EKEventEditViewActionCancelled
Removed EKEventEditViewActionDeleted
Removed EKEventEditViewActionSaved
Removed EKEventViewActionDeleted
Removed EKEventViewActionDone
Removed EKEventViewActionResponded
Declaration
From
class EKCalendarChooser : UIViewController {
    init!(selectionStyle selectionStyle: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, eventStore eventStore: EKEventStore!)
    init!(selectionStyle style: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, entityType entityType: EKEntityType, eventStore eventStore: EKEventStore!)
    var selectionStyle: EKCalendarChooserSelectionStyle { get }
    weak var delegate: EKCalendarChooserDelegate!
    var showsDoneButton: Bool
    var showsCancelButton: Bool
    var selectedCalendars: Set<NSObject>!
}
To
class EKCalendarChooser : UIViewController {
    init(selectionStyle selectionStyle: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, eventStore eventStore: EKEventStore)
    init(selectionStyle style: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, entityType entityType: EKEntityType, eventStore eventStore: EKEventStore)
    var selectionStyle: EKCalendarChooserSelectionStyle { get }
    weak var delegate: EKCalendarChooserDelegate?
    var showsDoneButton: Bool
    var showsCancelButton: Bool
    var selectedCalendars: Set<EKCalendar>
}

Declaration
From
weak var delegate: EKCalendarChooserDelegate!
To
weak var delegate: EKCalendarChooserDelegate?

Declaration
From
init!(selectionStyle style: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, entityType entityType: EKEntityType, eventStore eventStore: EKEventStore!)
To
init(selectionStyle style: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, entityType entityType: EKEntityType, eventStore eventStore: EKEventStore)

Declaration
From
init!(selectionStyle selectionStyle: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, eventStore eventStore: EKEventStore!)
To
init(selectionStyle selectionStyle: EKCalendarChooserSelectionStyle, displayStyle displayStyle: EKCalendarChooserDisplayStyle, eventStore eventStore: EKEventStore)

Declaration
From
var selectedCalendars: Set<NSObject>!
To
var selectedCalendars: Set<EKCalendar>

Declaration
From
protocol EKCalendarChooserDelegate : NSObjectProtocol {
    optional func calendarChooserSelectionDidChange(_ calendarChooser: EKCalendarChooser!)
    optional func calendarChooserDidFinish(_ calendarChooser: EKCalendarChooser!)
    optional func calendarChooserDidCancel(_ calendarChooser: EKCalendarChooser!)
}
To
protocol EKCalendarChooserDelegate : NSObjectProtocol {
    optional func calendarChooserSelectionDidChange(_ calendarChooser: EKCalendarChooser)
    optional func calendarChooserDidFinish(_ calendarChooser: EKCalendarChooser)
    optional func calendarChooserDidCancel(_ calendarChooser: EKCalendarChooser)
}

DeclarationIntroduction
From
optional func calendarChooserDidCancel(_ calendarChooser: EKCalendarChooser!)
iOS 8.0
To
optional func calendarChooserDidCancel(_ calendarChooser: EKCalendarChooser)
iOS 5.0

DeclarationIntroduction
From
optional func calendarChooserDidFinish(_ calendarChooser: EKCalendarChooser!)
iOS 8.0
To
optional func calendarChooserDidFinish(_ calendarChooser: EKCalendarChooser)
iOS 5.0

DeclarationIntroduction
From
optional func calendarChooserSelectionDidChange(_ calendarChooser: EKCalendarChooser!)
iOS 8.0
To
optional func calendarChooserSelectionDidChange(_ calendarChooser: EKCalendarChooser)
iOS 5.0

Declaration
From
class EKEventEditViewController : UINavigationController {
    weak var editViewDelegate: EKEventEditViewDelegate!
    var eventStore: EKEventStore!
    var event: EKEvent!
    func cancelEditing()
}
To
class EKEventEditViewController : UINavigationController {
    weak var editViewDelegate: EKEventEditViewDelegate?
    var eventStore: EKEventStore
    var event: EKEvent?
    func cancelEditing()
}

Declaration
From
weak var editViewDelegate: EKEventEditViewDelegate!
To
weak var editViewDelegate: EKEventEditViewDelegate?

Declaration
From
var event: EKEvent!
To
var event: EKEvent?

Declaration
From
var eventStore: EKEventStore!
To
var eventStore: EKEventStore

Declaration
From
protocol EKEventEditViewDelegate : NSObjectProtocol {
    func eventEditViewController(_ controller: EKEventEditViewController!, didCompleteWithAction action: EKEventEditViewAction)
    optional func eventEditViewControllerDefaultCalendarForNewEvents(_ controller: EKEventEditViewController!) -> EKCalendar!
}
To
protocol EKEventEditViewDelegate : NSObjectProtocol {
    func eventEditViewController(_ controller: EKEventEditViewController, didCompleteWithAction action: EKEventEditViewAction)
    optional func eventEditViewControllerDefaultCalendarForNewEvents(_ controller: EKEventEditViewController) -> EKCalendar
}

DeclarationIntroduction
From
func eventEditViewController(_ controller: EKEventEditViewController!, didCompleteWithAction action: EKEventEditViewAction)
iOS 8.0
To
func eventEditViewController(_ controller: EKEventEditViewController, didCompleteWithAction action: EKEventEditViewAction)
iOS 4.0

DeclarationIntroduction
From
optional func eventEditViewControllerDefaultCalendarForNewEvents(_ controller: EKEventEditViewController!) -> EKCalendar!
iOS 8.0
To
optional func eventEditViewControllerDefaultCalendarForNewEvents(_ controller: EKEventEditViewController) -> EKCalendar
iOS 4.0

Declaration
From
class EKEventViewController : UIViewController {
    weak var delegate: EKEventViewDelegate!
    var event: EKEvent!
    var allowsEditing: Bool
    var allowsCalendarPreview: Bool
}
To
class EKEventViewController : UIViewController {
    weak var delegate: EKEventViewDelegate?
    var event: EKEvent
    var allowsEditing: Bool
    var allowsCalendarPreview: Bool
}

Declaration
From
weak var delegate: EKEventViewDelegate!
To
weak var delegate: EKEventViewDelegate?

Declaration
From
var event: EKEvent!
To
var event: EKEvent

Declaration
From
protocol EKEventViewDelegate : NSObjectProtocol {
    func eventViewController(_ controller: EKEventViewController!, didCompleteWithAction action: EKEventViewAction)
}
To
protocol EKEventViewDelegate : NSObjectProtocol {
    func eventViewController(_ controller: EKEventViewController, didCompleteWithAction action: EKEventViewAction)
}

Declaration
From
func eventViewController(_ controller: EKEventViewController!, didCompleteWithAction action: EKEventViewAction)
To
func eventViewController(_ controller: EKEventViewController, didCompleteWithAction action: EKEventViewAction)