我查看了苹果的相同代码并且没有想出来。
我正在尝试从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];
}