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

[Solved] Multiple Day Events

1 Answer 66 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.
Jacob
Top achievements
Rank 1
Jacob asked on 04 Mar 2015, 02:09 PM
I see that in the iPad theme that you can make you events span across the calendar. Is there any way to customize the look of that bar that spans across? Position, Size, rounded corner?

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 04 Mar 2015, 02:39 PM
Hi Jacob,

Thank you for contacting us.

Yes, there is a way. You should use a custom day cell and override its drawEvents:rect: method. Here is the code:
@interface MyCell : TKCalendarDayCell
@end
 
@implementation MyCell
 
- (void)drawEvents:(CGContextRef)context rect:(CGRect)rect
{
    // place custom event drawing code here
}
 
@end

You should adopt TKCalendarDelegate in order to replace the default cell:
- (TKCalendarCell *)calendar:(TKCalendar *)calendar viewForCellOfKind:(TKCalendarCellType)cellType
{
    if (cellType == TKCalendarCellTypeDay) {
        return [MyCell new];
    }
    return nil;
}

Should you have further questions, feel free to ask.

Regards,
Jack
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Calendar
Asked by
Jacob
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or