Hi,
I am trying to customize the inline events, and somehow it doesnt work like I want it.
Here (http://www.telerik.com/forums/how-to-customize-the-inline-event-template-of-telerik-calendar-for-ios) I have found the code to do it. It is actually a pretty simple piece of code:
@interface MyInlineView : TKCalendarInlineView
@end
@implementation MyInlineView
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
}
TKCalendarEvent *event = self.dayCell.events[indexPath.row];
cell.textLabel.text = event.title;
return cell;
}
I placed this code inside the same file where my calendarview is.
My problem is that I dont get how this code can work like expected. First, I cant attach a tableView, it is comming from "inside", thats ok with me, but how can than dequeueReusableCellWithIdentifier work for a custom cell ? The cell should be inside the table view in order to reuse it, which it isnt, bcz I am not able to change the used tableview (so acatually every time the cell is being created, and dequeueReusableCellWithIdentifier is obsolete). But this is also not working, bcz after I create my custom cell all the controls are nil (thats expected bcz they are weak references ...)
Am I missing smt here, and can someone tell me how to implement a custom cell ?
Thanks,
Regards