Customizing divider lines

6 posts, 2 answers
  1. Barry
    Barry avatar
    4 posts
    Member since:
    Sep 2015

    Posted 16 Sep 2015 Link to this post

    Hello,

     

    I have been able to customize the looks of the calendar to my likings, however one thing remains: The color of the divider lines. How can I change those?

    See the attached screenshot.

    Thanks.

  2. Barry
    Barry avatar
    4 posts
    Member since:
    Sep 2015

    Posted 16 Sep 2015 Link to this post

    One more question: How can I force to call 'calendar(calendar: TKCalendar!, updateVisualsForCell cell: TKCalendarCell!)'?

    I use this for setting the event Insets, and it needs updating when the calendar view grows or shrinks (for example when the device is rotated, or when the event tableview is expanding / collapsing).

  3. DevCraft banner
  4. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 16 Sep 2015 Link to this post

    Hello Barry,

    Thank you for contacting us.

    This can be done by adopting TKCalendarDelegate and implementing its calendar:updateVisualsForCell: method. Consider the code below:
    - (void)calendar:(TKCalendar *)calendar updateVisualsForCell:(TKCalendarCell *)cell
    {
        if ([cell isKindOfClass:[TKCalendarDayCell class]] || [cell isKindOfClass:[TKCalendarWeekNumberCell class]]) {
            cell.style.bottomBorderColor = [UIColor redColor];
            cell.style.topBorderColor = [UIColor redColor];
        }
    }

    Feel free to contact us if you have any additional questions.

    Regards,
    Jack
    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
  5. Barry
    Barry avatar
    4 posts
    Member since:
    Sep 2015

    Posted 16 Sep 2015 Link to this post

    Thanks a lot Jack, that works perfectly.

    Can you also look into my second question (might have overlapped when you where responding to my first post)?

  6. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 16 Sep 2015 Link to this post

    HI again,

    You can force TKCalendar to updated its visual elements and call the calendar:updateVisualsForCell: method by calling the update method of TKCalendarPresenter. Here is a sample:
    self.calendarView.presenter.update(false)

    I hope this helps.

    Regards,
    Jack
    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
  7. Barry
    Barry avatar
    4 posts
    Member since:
    Sep 2015

    Posted 16 Sep 2015 Link to this post

    Thanks again Jack.

Back to Top
DevCraft banner