Search code examples
iphoneobjective-cipadekeventkit

How to customise a EKEventEditViewController?


I am using the EKEventEditViewController to add events to the calendar, however I need to customise the table view, such as background colour and cell properties.

I have tried looping through its subviews like so with no luck.

Failed code:

EKEventEditViewController *eventVc = [[EKEventEditViewController alloc] init];
    eventVc.event = event;
    eventVc.delegate = self;
    eventVc.eventStore = eventStore;
    eventVc.editViewDelegate = self;

    for (UITableView *view in [eventVc.view subviews]) {
        [view setBackgroundColor:[UIColor redColor]];
    }

    [self presentModalViewController:eventVc animated:YES];

Solution

  • There hasn't been a simple solution to this, but I ended up creating a custom view controller from which I handled all the event data manually.