0

使用EventKit我的标题字符串呈现事件视图时,标题建议未显示在呈现的视图中,它只是空白

  EKEventStore *es = [[EKEventStore alloc] init];
                EKEventEditViewController *controller = [[EKEventEditViewController alloc] init];
                controller.eventStore = es;
                controller.editViewDelegate = self;

                EKEvent *event  = [EKEvent eventWithEventStore:eventStore];
                event.title = @"This is an event"; //does not appear in presented view

               [self.editController presentModalViewController:controller animated:YES];

               [event setCalendar:[eventStore defaultCalendarForNewEvents]];
4

1 回答 1

1

您应该将事件对象分配给控制器。

controller.event = event;
于 2013-01-01T12:31:19.587 回答