This is a migrated thread and some comments may be shown as answers.

Dates visible to user

2 Answers 28 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Medica Developer 1
Top achievements
Rank 1
Medica Developer 1 asked on 03 Jul 2015, 12:43 PM

Hi, this is a similar question to the "Visible dates in a week" in this forum but the answer doesn't fit what I need to know.

 If the app is displaying a week say 1/7 - 7/7 and the user swipes to some week in the future, how does the app know this has happened and how do I know which week they have currently displayed. 

2 Answers, 1 is accepted

Sort by
0
Medica Developer 1
Top achievements
Rank 1
answered on 03 Jul 2015, 04:48 PM

I'm currently using this delegate method

 

- (NSArray *)calendar:(TKCalendar *)calendar eventsForDate:(NSDate *)date
{

}

 

to determine the dates the calendar is asking for, but this seems really inefficient?

0
Sophi
Telerik team
answered on 06 Jul 2015, 03:43 PM
Hello Paul,

In order to be notified when the user swipes to some future or past week you should conform
 to the TKCalendarDelegate protocol and implement didNavigateToDate method:

-(void)calendar:(TKCalendar *)calendar didNavigateToDate:(NSDate *)date{
    NSDate *d = date;  
}

Do not forget to set the delegate property of your calendar.
calendarView.delegate = self;

I hope this helps. If you have any other questions do not hesitate to ask.

Regards,
Sophi
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
Tags
Calendar
Asked by
Medica Developer 1
Top achievements
Rank 1
Answers by
Medica Developer 1
Top achievements
Rank 1
Sophi
Telerik team
Share this question
or