从 Event Kit iPhone iOS 中提取特定事件的标题和开始日期
我查看了苹果的相同代码,但还没有弄清楚。
我正在尝试从 iOS 4.0 或更高版本的事件工具包中提取单个事件的标题和开始日期。
我已经采取了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];
}
I have looked over apple's same code and haven't figured it out.
I am trying to pull a single event's title and startDate from Event Kit in iOS 4.0 or later.
I have taken Apple's EKDemo sample code and tried modifying the didSelect method, but the app SIGBART out every time I modified it. any ideas?
- (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];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论