3

我有一个使用此代码选择一行的UITableViewController推送:EKEventViewController

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
     if([segue.identifier isEqualToString:@"eventHandler"]){
         if (_currentPanel.event_identifier != nil) {
             self.event = [[[CalendarHelper sharedInstance] store] eventWithIdentifier:_currentPanel.event_identifier];
    } else {
        EKEventStore *store = [[CalendarHelper sharedInstance] store];
        self.event = [EKEvent eventWithEventStore:store];
        _event.startDate = self.qualifyDate;
        _event.endDate = self.qualifyDate;

        _event.title = @"test identifier" ;
        _event.calendar = [[CalendarHelper sharedInstance] calendar];
    }
    self.eventDatailController =  (EKEventViewController *)[segue destinationViewController];

    self.eventDatailController.event = self.event;
    self.eventDatailController.allowsEditing = YES;
    self.eventDatailController.allowsCalendarPreview = YES;
    self.eventDatailController.delegate = self;
}
}

事件显示良好,但在EKEventViewController通过编辑按钮编辑事件并完成点击完成按钮后,事件EKEventViewController没有相应刷新。

工作正常,SimpleEKDemo但不使用

prepareForSegue:sender: 

tableView:didSelectRowAtIndexPath:

我究竟做错了什么?

4

1 回答 1

0

您总是可以通过执行以下操作从 didSelectRowAtIndexPath 调用 prepareForSegue 方法:

[self prepareForSegue:@"EKEventViewController" sender:self];
于 2012-12-12T13:52:08.103 回答