user2604897
user2604897

Reputation: 191

JTcalendar in IOS

I am trying to use JTcalendar library to build a custom calendar. In the current implementation , the scroll happens when the user swipes on the screen. I need two buttons left and right to support the scroll feature.

To do this , I have added two buttons in the menu bar for left and right scroll and tried to call the viewDidScroll() function on click of either. However this is not working.

Can anyone please point me in the right direction? I can share the current implementation if needed.

Upvotes: 2

Views: 788

Answers (2)

user2604897
user2604897

Reputation: 191

Using the above suggestions, this is how I was able to do this.

The contentView that I am using is from manager object as it is available in my MenuView Class. So this is now the shared contentView.

On this I have called loadpreviouspageWithAnimation and LoadNextPageWithAnimation.

Like So,

- (void) leftAction {
[_manager.contentView loadPreviousPageWithAnimation];

}

- (void) rightAction {
[_manager.contentView loadNextPageWithAnimation];
}

Where the _manager object is already available in the menuView and leftAction and RightAction are the target methods for the buttons.

Thanks!!

Upvotes: 2

Wolverine
Wolverine

Reputation: 4329

You have define somewhere JTHorizontalCalendarView object like below line of code.

@property (weak, nonatomic) IBOutlet JTHorizontalCalendarView *calendarContentView;

So for next month

[_calendarContentView loadNextPage];

For previous month

[_calendarContentView loadPreviousPage];

Upvotes: 1

Related Questions