Dates visible to user

3 posts, 0 answers
  1. Medica Developer 1
    Medica Developer 1 avatar
    3 posts
    Member since:
    Dec 2013

    Posted 03 Jul 2015 Link to this post

    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. Medica Developer 1
    Medica Developer 1 avatar
    3 posts
    Member since:
    Dec 2013

    Posted 03 Jul 2015 Link to this post

    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?

  3. DevCraft banner
  4. Sophi
    Admin
    Sophi avatar
    99 posts

    Posted 06 Jul 2015 Link to this post

    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
Back to Top