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 SCKGridView. These values are conform to the Hashable and NSSecureCoding protocols.

    See more

    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 its mode property to SCKViewControllerMode.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 its mode property to SCKViewControllerMode.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.
    See more

    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 more

    Declaration

    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.
    See more

    Declaration

    Swift

    @objc public class SCKView: NSView
  • The SCKEventRequest class represents a wrapper type used by an SCKViewController 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 SCKViewController’s loadsEventsAsynchronously to true. When this option is enabled, the events(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 the complete(with:) method.

    See more

    Declaration

    Swift

    @objc public class SCKEventRequest: NSObject
  • The SCKConcreteEventRequest is a convenience generic (thus, Swift-only) SCKEventRequest subclass that replaces the base class when the owning SCKViewController is working with a type-specific delegate, which allows you work in a more type-safe way.

    See more

    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 or SCKConcreteEventManaging and set the eventManagerproperty. 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 to SCKConcreteEventManaging 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 the reloadData(ofConcreteType:) method to begin new event fetches. If you work with multiple event classes, you’ll have to use SCKEventManaging and call reloadData() 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:.
    See more

    Declaration

    Swift

    @objc open class SCKViewController: NSViewController