我查看了苹果的相同代码并没有弄清楚。
我正在尝试从 iOS 4.0 或更高版本的 Event Kit 中提取单个事件的标题和 startDate。
我采用了 Apple 的 EKDemo 示例代码并尝试修改 didSelect 方法,但每次修改时都会删除应用程序 SIGBART。有任何想法吗?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Upon selecting an event, create an EKEventViewController to display the event.
self.detailViewController = [[EKEventViewController alloc] initWithNibName:nil bundle:nil];
detailViewController.event = [self.eventsList objectAtIndex:indexPath.row];
// Allow event editing.
detailViewController.allowsEditing = YES;
// Push detailViewController onto the navigation controller stack
// If the underlying event gets deleted, detailViewController will remove itself from
// the stack and clear its event property.
[self.navigationController pushViewController:detailViewController animated:YES];
}