从 Event Kit iPhone iOS 中提取特定事件的标题和开始日期

发布于 2024-10-19 08:31:08 字数 978 浏览 1 评论 0原文

我查看了苹果的相同代码,但还没有弄清楚。

我正在尝试从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文