It tried the following code segment to customize the back bar button with my own button. This had no effect as it looked like default back button.
EKEventViewController*eventView = [[EKEventViewController alloc] initWithNibName:nil bundle:nil];
eventView.event = closestEvent;
eventView.allowsEditing = NO;
UIButton* leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
[leftButton setImage:[UIImage imageNamed:@"closeButton.png"] forState:UIControlStateNormal];
leftButton.frame = CGRectMake(0, 0, 25, 25);
[leftButton addTarget:nil action:nil forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
[self.navigationController pushViewController:eventView animated:YES];
I also tried to put the EKEventViewController as a child view of a another view controller which I had no clue how to get it right. Either way I'd simply like to customize the back button.
Update, I tried this:
eventView.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
Works but then a done button is automatically added on the right-side(may be at runtime?) I tried to nil the right bar button but had no effect:
eventView.navigationItem.rightBarButtonItem = nil;