2013-01-01 61 views
0

一個呈現視圖使用EventKit我的標題字符串中所提出的觀點不顯示事件時標題所暗示的,它只是空白事件名稱沒有顯示使用EK活動,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]]; 

回答

1

您應該指定事件對象到控制器。

controller.event = event; 
+0

非常感謝您的支持! – JSA986