EKCalendarChooser视图中缺少“编辑”按钮

时间:2014-06-13 10:51:12

标签: ios calendar edit

使用以下代码显示该视图上缺少EKCalendarChooser View.But Edit按钮。

  EKEventStore * eventStore = [[EKEventStore alloc] init];

  EKCalendarChooser *calendarChooser = [[EKCalendarChooser alloc]
                                              initWithSelectionStyle:EKCalendarChooserSelectionStyleMultiple
                                          displayStyle:EKCalendarChooserDisplayAllCalendars
                                          eventStore:eventStore];

 calendarChooser.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
        calendarChooser.delegate = self;
        calendarChooser.navigationItem.hidesBackButton = YES;
        [calendarChooser.navigationController setNavigationBarHidden:NO];
        calendarChooser.navigationItem.backBarButtonItem = calendarChooser.editButtonItem;
          [self.navigationController pushViewController:calendarChooser animated:NO];

感谢您的帮助..

1 个答案:

答案 0 :(得分:0)

您必须将EKCalendarChooser放入UINavigationController中 并手动添加按钮。

在这里看到我的答案:

EKCalendarChooser new Calendar