View transitions allow for switching to the next/previous month with different animation effects. Those effects are available in all view mode presenters that inherit from TKCalendarPresenterBase
. These include: month, month names, year numbers. Detailed information about view modes is available in this help article: View modes
The available animations are: card, flip, flow, fold, rotate, and scroll. The default transition is scroll. You should access the transitionMode
property of the presenter class in order to customize the transition effect:
TKCalendarMonthPresenter *presenter = (TKCalendarMonthPresenter*)self.calendarView.presenter;
presenter.transitionMode = TKCalendarTransitionModeFlip;
let presenter = self.calendarView.presenter as! TKCalendarMonthPresenter
presenter.transitionMode = TKCalendarTransitionMode.flip
TKCalendarMonthPresenter presenter = (TKCalendarMonthPresenter)this.CalendarView.Presenter;
presenter.TransitionMode = TKCalendarTransitionMode.Flip;
The following options can be applied on transitions:
The transitionIsVertical
changes the horizontal/vertical orientation of the transition, this changes also the activation gesture:
presenter.transitionIsVertical = NO;
presenter.transitionIsVertical = false
presenter.TransitionIsVertical = true;
The transitionIsReverse
changes the forward/backward direction of the transition, thus changing its effect.
Finally the transition duration can be customized by setting the transitionDuration
property:
presenter.transitionDuration = 2;
presenter.transitionDuration = 2
presenter.TransitionDuration = 2;