Classes
The following classes are available globally.
-
This type can be used to represent (and to make persistent copies of) a break or unavailable time range within a day being represented by a subclass of @c
See moreSCKGridView
. These values are conform to theHashable
andNSSecureCoding
protocols.Declaration
Swift
public class SCKUnavailableTimeRange: NSObject, NSSecureCoding
-
An grid-style schedule view that displays events in a single day date interval. Use it by creating a new
SCKViewController
object and setting itsmode
property toSCKViewControllerMode.day
. Then, configure the view with a date interval from the start of a day (00:00:00) to its last second (23:59:59).Optionally, you may set the
delegate
property and implement its methods to change the displayed hour range (which defaults to the whole day).Declaration
Swift
public final class SCKDayView: SCKGridView
-
An grid-style schedule view that displays events in a week date interval. Use it by creating a new
SCKViewController
object and setting itsmode
property toSCKViewControllerMode.week
. Then, configure the view with a date interval from the start of the first day in the week (00:00:00) to the last second (23:59:59) of the last day.Optionally, you may set the
delegate
property and implement its methods to change the displayed hour range (which defaults to the whole day).Declaration
Swift
public final class SCKWeekView: SCKGridView
-
An abstract
SCKView
subclass that implements the common functionality of any grid-style schedule view, such as the built in day view and week view. This class provides conflict management, interaction with the displayed days and hours, displaying unavailable time intervals and a zoom feature.It also manages a series of day, month, hour and hour fraction labels, which are automatically updated and laid out by this class.
Note
Do not instantiate this class directly.Declaration
Swift
public class SCKGridView: SCKView
-
The view class used by ScheduleKit to display each event in a schedule view. This view is responsible of managing a descriptive label and also of handling mouse events, including drag and drop operations, which may derive in changes to the represented event.
See moreDeclaration
Swift
public final class SCKEventView: NSView
-
An abstract NSView subclass that implements the basic functionality to manage a set of event views provided by an
SCKViewController
object. This class provides basic handling of the displayed date interval and methods to convert between these date values and view coordinates.In addition,
SCKView
provides the default (and required) implementation for event coloring, selection and deselection, handling double clicks on empty dates and drag & drop.Note
Do not instantiate this class directly.Declaration
Swift
@objc public class SCKView: NSView
-
The
SCKEventRequest
class represents a wrapper type used by anSCKViewController
object to encapsulate relevant info and to handle new events when reloading events asynchronously.Asynchronous event loading is disabled by default. You may enable it by setting
See moreSCKViewController
’sloadsEventsAsynchronously
totrue
. When this option is enabled, theevents(from:to:for:)
method won’t be called on the event manager. Instead,scheduleController(_:didMakeEventRequest:)
will get called with this object as a parameter. The event manager is responsible of keeping a (weak) reference to this request, loading the appropiate events asynchronously and, eventually, passing them back to the request on the main queue via thecomplete(with:)
method.Declaration
Swift
@objc public class SCKEventRequest: NSObject
-
The
See moreSCKConcreteEventRequest
is a convenience generic (thus, Swift-only)SCKEventRequest
subclass that replaces the base class when the owningSCKViewController
is working with a type-specific delegate, which allows you work in a more type-safe way.Declaration
Swift
public final class SCKConcreteEventRequest<T>: SCKEventRequest
-
A NSViewController subclass that sets up a schedule view embedded in a scroll view and displays a set of events within a day or a week time interval. The SCKViewController implements all the event processing and conflict handling logic. It also manages the zooming and the day/week offsetting for you.
To provide events to a SCKViewController, just make an object or a subclass conform to
SCKEventManaging
orSCKConcreteEventManaging
and set theeventManager
property. Finally, call a suitable reload data method to execute the first event fetch.If you use Swift, you may choose between implementing
SCKEventManaging
or working in concrete mode by conforming toSCKConcreteEventManaging
and declaring an event type. Use the concrete mode when working with a single event class to benefit from Swift’s type safety and work with better-typed methods in your event manager implementation. If you do so, you must also use thereloadData(ofConcreteType:)
method to begin new event fetches. If you work with multiple event classes, you’ll have to useSCKEventManaging
and callreloadData()
to load new events instead.Events are fetched synchronously by default, but asynchronous event fetching is also available by setting the
loadsEventsAsynchronously
property to true and implementing the proper event manager methods.Note
SCKConcreteEventManaging
is not available in Objective-C. In addition, the event manager must be set via-setObjCDelegate:
.Declaration
Swift
@objc open class SCKViewController: NSViewController