问题标签 [ekevent]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
434 浏览

ios - 如何将日历事件描述转换为 iPhone 中的字典对象?

我正在从日历中获取事件,并且对于每个事件我想获取所有数据。但我将其中一些作为对象,如 EKRecurrenceRule、EkCalendar、EKAlarm。现在我想从对象中获取特定字段。我尝试将对象转换为 Dictionary 对象,但它作为单个对象进行,当我访问它时,它返回整个对象的单个值。任何人都可以帮我将它们直接转换成字典。

0 投票
2 回答
493 浏览

ios - iOS EventKit:在 iCloud 以外的不同部分显示日历/在我的 iPhone 上

有没有办法在我的应用程序中创建一个新日历,该日历将显示在本机 iOS 日历应用程序的不同部分?

http://i.imgur.com/HQBi1Gi.png

从上图可以看出,Facebook 有自己的日历部分,Hotmail、Gmail 等也有。

目前,我可以使用源 EKSourceTypeLocal 或 EKSourceTypeCalDAV 创建日历,它们将分别显示在“On My iPhone”或“iCloud”组下。我可以在这里创建一个新部分吗?您似乎无法创建新来源,所以我不知道如何处理。

0 投票
0 回答
160 浏览

iphone - MBProgressHUD object not show when do requestAccessToEntityType for EKEntityTypeEvent

I want to show the MBProgressHUD object - progressHud during process auto add about 100 events to calendar. Here is codes when i touch on the button to do this task.

In the add_more_event_execute function below if i try to request access to entity type for EKEntityTypeEvent to add the new event to calendar in iOS6 then the progressHud shows and hides immediately. I need the progressHud is shown until all events add to calendar completely. The progressHud works well if i don't request Access and run it in iOS5.

Please explain my issue and give me a solution. Thanks!

0 投票
2 回答
738 浏览

objective-c - Event Date in Calendar sets on day earlier after saving

I am new with EKEventKit and I am trying to create an event in calendar using EKEvent. It works fine but after saving the event when I check again the event date it gets one day earlier.

I am writing my code here with output. Please have a look

OUTPUT ::

We can see here that there is 1 Day before. but they should be same.

I hope I am very much clear with my question, but still if any question, you can ask me.

thanks in anticipation.

0 投票
1 回答
232 浏览

objective-c - Objective-c EKEventEditViewController 关闭键盘

我正在展示一个将事件插入日历所需的 EKEventEditViewController。一切都很好,但是当我去选择一个日期时,如何以编程方式关闭键盘?

0 投票
0 回答
417 浏览

parsing - 解析 EKEvent 描述文本

我目前正在开发一个上传 EKEvent 的 iOS 应用程序,event.description它是一个基本的 NSString。

问题是,当我在上传文件后从服务器下载文件时,解析字符串很麻烦。

目前,这是我下载文本文件时正在查看的字符串

"EKEvent <0x9dd50b0> {EKEvent <0x9dd50b0> {title = Another Event SC; location = A House; calendar = EKCalendar <0x994e7f0> {title = Calendar; type = Local; allowsModify = YES; color = #0E61B9;}; alarms = (null); URL = (null); lastModified = 2013-04-11 20:44:58 +0000; timeZone = (null)}; location = A House; startDate = 2012-10-11 07:00:00 +0000; endDate = 2012-10-13 06:59:59 +0000; allDay = 1; floating = 1; recurrence = (null); attendees = (null)}"

我认为解析这个文件不会很糟糕,但我对目标 C 相当陌生。

这是我到目前为止所做的

假设anotherString包含之前显示的下载文本文件字符串。这是分离字符串并将每个分离的字符串存储到 totalEventInfo 的增量组件后的输出。

)

如何指定字符串的域?前任。从一个字符串中读入,从一个字符'='开始的一串字符并在下一个';'处结束。

也许这不是解析信息的好方法。

我在考虑不是上传包含 EKEvent 的 event.description 的文件,而是上传一个带有 event.title、event.startdate、event.enddate 等的文件,而不是 event.description 并且每次都必须解析文件下载。

建议或意见表示赞赏:)

0 投票
1 回答
2883 浏览

iphone - 将 .ics 文件导入 iOS 用户日历

我正在尝试将 .ics 文件添加到用户日历。我已经尝试使用 UIDocumentInteractionController 来执行此操作,但这仅显示预览窗口而不是添加事件的视图,就像您使用 iPhone 邮件应用程序打开 .ics 文件时所做的那样。这是我的代码:

我究竟做错了什么?或者有没有办法以编程方式将 .ics 文件的事件添加到日历中(而不是创建许多 EKEvents)?

谢谢

0 投票
1 回答
2486 浏览

ios - 如何检测哪个 EKevent 被更改

我有问题。我需要知道我的 EventStore 中的事件何时发生更改,因此对于这种情况,我使用EKEventStoreChangedNotification但此通知返回给我难以理解userInfo 的字典,它看起来像这样:

我不知道如何使用这些数据来访问更改的对象。请帮我

0 投票
1 回答
456 浏览

ios - 将事件添加到日历时,NSDateFormatter 未正确格式化日期

我无法弄清楚如何使用 NSDateFormatter 解析某种日期格式并将其放入 EKEvent 中。目前这是我的代码。我已经请求添加事件的权限,并且从 requestAccessToEntityType:completion 的完成处理程序调用方法:

NSLog 打印以下内容:

开始:2013-04-28 21:30:00 +0000
结束:2013-04-29 00:30:00 +0000

在这种特殊情况下,我希望这是 12 小时的时间

对于这种日期字符串样式,NSDateFormatter 格式字符串似乎是正确的,但由于某种原因,输出不正确。在设置更多属性后,该事件实际上是稍后在代码中添加到日历中的,但这对于这个问题并不重要。
请注意,我在解析 iOS 6.0 之前的日期时从未遇到过这个问题,所以这可能是我没有考虑到的 API 或格式的某些更改的产物?有没有我没有看到的明显错误?

谢谢。

0 投票
0 回答
215 浏览

objective-c - EKEvent 保存在 iPad 日历中,但不保存在 iPhone 日历中

在我的应用程序中,我需要将事件保存到设备日历中。目前,它确实保存在 iPad 日历中,但没有保存在 iPhone 日历中,这很奇怪。

这是我的代码:

我该如何解决这个问题?