Presenting an EKCalendarChooser modally
Posted
by
pmb
on Stack Overflow
See other posts from Stack Overflow
or by pmb
Published on 2011-10-26T23:07:12Z
Indexed on
2014/06/13
9:26 UTC
Read the original article
Hit count: 229
ios
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
© Stack Overflow or respective owner