ShinobiCalendar Class Reference

Inherits from UIView
Declared in SCalendar.h
Availability
Related samples

Overview

Displays an infinite scrolling list of dates.

Properties

dataSource

The datasource, which controls indicators and events the year view should display.

@property (nonatomic, assign) id<SCalendarDataSource> dataSource

Declared In

SCalendar.h

delegate

The delegate, which allows the owner to respond to events and to customise the calendar.

@property (nonatomic, assign) id<SCalendarDelegate> delegate

Declared In

SCalendar.h

gestureRecognizer

The gesture recognizer that the calendar uses to zoom in and out of the calendar.

@property (nonatomic, strong, readonly) UIPinchGestureRecognizer *gestureRecognizer

Declared In

SCalendar.h

licenseKey

The trial license key for this Calendar (trial versions only).

@property (nonatomic, retain) NSString *licenseKey

Discussion

In trial versions, a valid trial license key must be set before the Calendar will render. When you download a trial version of ShinobiCalendars, you will also receive an email containing the trial license key.

Warning: DEPRECATED. You should use the ShinobiCalendars.trialKey property instead.

Declared In

SCalendar.h

maximumDate

The maximum date that the user should be able to select on the calendar. The calendar will not scroll to a position after this date.

@property (nonatomic, strong) NSDate *maximumDate

Declared In

SCalendar.h

maximumZoomLevel

The maximum zoom level of the calendar. The calendar cannot zoom in past this level. Defaults to SCalendarZoomLevelDay.

@property (nonatomic, assign) SCalendarZoomLevel maximumZoomLevel

Declared In

SCalendar.h

minimumDate

The minimum date that the user should be able to select on the calendar. The calendar will not scroll to a position before this date.

@property (nonatomic, strong) NSDate *minimumDate

Declared In

SCalendar.h

minimumZoomLevel

The minimum zoom level of the calendar. The calendar cannot zoom out past this level. Defaults to SCalendarZoomLevelYear.

@property (nonatomic, assign) SCalendarZoomLevel minimumZoomLevel

Declared In

SCalendar.h

monthColumnsAtYearZoomLevel

The number of month columns when the calendar is at the year zoom level. This defaults to 2 on iPhone, and 3 on iPad. The maximum number is 4, and the minimum number is 1.

@property (nonatomic, assign) NSInteger monthColumnsAtYearZoomLevel

Declared In

SCalendar.h

style

The style that the calendar uses to configure its appearance.

@property (nonatomic, strong) SCalendarStyle *style

Declared In

SCalendar.h

Instance Methods

dequeueReusableEventViewWithIdentifier:

Returns a reusable event view object located by its identifier.

- (id)dequeueReusableEventViewWithIdentifier:(NSString *)identifier

Parameters

identifier

A string identifying the event view object to be reused. This parameter must not be nil.

Return Value

An SCalendarEventView object with the associated reuse identifier. This method always returns a valid event view.

Declared In

SCalendar.h

initWithFrame:andStartDate:

Creates a new ShinobiCalendar with the specified start date.

- (instancetype)initWithFrame:(CGRect)frame andStartDate:(NSDate *)startDate

Parameters

frame

The inital frame for the calendar.

startDate

The proxy that provides the datasource and the delegate.

Return Value

A new ShinobiCalendar.

Declared In

SCalendar.h

initWithFrame:startDate:initialZoomLevel:andStyle:

Creates a new ShinobiCalendar with the specified start date, initial zoom level, and style.

- (instancetype)initWithFrame:(CGRect)frame startDate:(NSDate *)startDate initialZoomLevel:(SCalendarZoomLevel)initialZoomLevel andStyle:(SCalendarStyle *)style

Parameters

frame

The inital frame for the calendar.

startDate

The proxy that provides the datasource and the delegate.

initialZoomLevel

The zoom level that the calendar will start at.

style

The style that will be applied to the calendar when it is created.

Return Value

A new ShinobiCalendar.

Declared In

SCalendar.h

initWithFrame:startDate:initialZoomLevel:minimumZoomLevel:maximumZoomLevel:andStyle:

Creates a new ShinobiCalendar with the specified start date, initial zoom level, and style.

- (instancetype)initWithFrame:(CGRect)frame startDate:(NSDate *)startDate initialZoomLevel:(SCalendarZoomLevel)initialZoomLevel minimumZoomLevel:(SCalendarZoomLevel)minimumZoomLevel maximumZoomLevel:(SCalendarZoomLevel)maximumZoomLevel andStyle:(SCalendarStyle *)style

Parameters

frame

The inital frame for the calendar.

startDate

The proxy that provides the datasource and the delegate.

initialZoomLevel

The zoom level that the calendar will start at.

minimumZoomLevel

The minimum zoom level that the user will be able to zoom to.

maximumZoomLevel

The maximum zoom level that the user will be able to zoom to.

style

The style that will be applied to the calendar when it is created.

Return Value

A new ShinobiCalendar.

Declared In

SCalendar.h

initWithFrame:startDate:initialZoomLevel:minimumZoomLevel:maximumZoomLevel:minimumDate:maximumDate:andStyle:

Creates a new ShinobiCalendar with the specified start date, zoom levels, min and max dates, and style.

- (instancetype)initWithFrame:(CGRect)frame startDate:(NSDate *)startDate initialZoomLevel:(SCalendarZoomLevel)initialZoomLevel minimumZoomLevel:(SCalendarZoomLevel)minimumZoomLevel maximumZoomLevel:(SCalendarZoomLevel)maximumZoomLevel minimumDate:(NSDate *)minimumDate maximumDate:(NSDate *)maximumDate andStyle:(SCalendarStyle *)style

Parameters

frame

The inital frame for the calendar.

startDate

The proxy that provides the datasource and the delegate.

initialZoomLevel

The zoom level that the calendar will start at.

minimumZoomLevel

The minimum zoom level that the user will be able to zoom to.

maximumZoomLevel

The maximum zoom level that the user will be able to zoom to.

minimumDate

The minimum date that the user will be able to scroll to / interact with.

maximumDate

The maximum date that the user will be able to scroll to / interact with.

style

The style that will be applied to the calendar when it is created.

Return Value

A new ShinobiCalendar.

Declared In

SCalendar.h

registerEventViewClass:forEventReuseIdentifier:

Registers a class for use in creating new event views.

- (void)registerEventViewClass:(Class)eventViewClass forEventReuseIdentifier:(NSString *)identifier

Parameters

eventViewClass

The class of an event view that you want to use in the calendar.

identifier

The reuse identifier for the cell. This parameter must not be nil or an empty string.

Declared In

SCalendar.h

scrollToDate:atZoomLevel:animated:

Moves the calendar to the specified date while changing to the given zoom level. This can be animated or can happen instantly. Setting the zoom level to the current zoom level will still move the view to the specified date.

- (void)scrollToDate:(NSDate *)date atZoomLevel:(SCalendarZoomLevel)zoomLevel animated:(BOOL)animated

Declared In

SCalendar.h

zoomIn

Zooms in a single zoom level around the center date. Does nothing if the current zoom level is the maximum zoom level.

- (void)zoomIn

Declared In

SCalendar.h

zoomOut

Zooms out a single zoom level around the center date. Does nothing if the current zoom level is the minimum zoom level.

- (void)zoomOut

Declared In

SCalendar.h