Presenting an EKCalendarChooser modally
- by pmb
I'm trying to present the new EKCalendarChooser in my app as a modal view. I'm doing it using the following code:
EKCalendarChooser *calendarChooser = [[EKCalendarChooser alloc]
initWithSelectionStyle:EKCalendarChooserSelectionStyleMultiple
displayStyle:EKCalendarChooserDisplayAllCalendars
eventStore:self.ekDataSource.eventStore];
calendarChooser.showsDoneButton = YES;
calendarChooser.showsCancelButton = NO;
calendarChooser.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
calendarChooser.delegate = self;
[[self navigationController] presentViewController:calendarChooser animated:YES completion:nil];
The problem I'm having is that when the view is displayed, it is missing the done button. If however, I display the view using the following code:
[[self navigationController] pushViewController:calendarChooser animated:YES];
It works just fine. The done button is displayed. Shouldn't the done button be shown with the presentViewController call as well?
Thanks in advance for any help!
pmb