Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Is there an event to know if the user scrolled to another month?

$
0
0
Hi Fabio,

Thank you for contacting us.

1. To handle scrolling to another month you should adopt TKCalendarDelegate and implement its calendar:didNavigateToDate: method. Consider the code snippet below:
- (void)calendar:(TKCalendar *)calendar didNavigateToDate:(NSDate *)date
{
    // handle navigation
}

2. displayedDate method of TKCalendar returns the currently displayed date. Once you have the displayed date you can easily get the month. The code snippet below demonstrate how to achieve this:
NSDate *currentDate = _calendarView.displayedDate;
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDateComponents *components = [calendar components:NSCalendarUnitMonth fromDate:currentDate];
NSInteger currentMonth = components.month;

I hope this helps. Should you have further questions, do not hesitate to contact us.

Regards,
Adrian
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>