【问题标题】:Objective C: Need to parse an objectObjective C:需要解析一个对象
【发布时间】:2014-07-28 06:39:54
【问题描述】:

我有一个日历对象返回为

1:58:26 EAS-iPhone-5c InstaFeed[346] <Warning>: (
    "EKEvent <0x1658d5b0>\n{\n\t EKEvent <0x1658d5b0>\n{\t title = \t\tMeetings for surveyApp; \n\t location = \tany loacation; \n\t calendar = \tEKCalendar <0x1668d4e0> {title = Calendar; type = Exchange; allowsModify = YES; color = #A2845E;}; \n\t alarms = \t\t(\n    \"EKAlarm <0x16692740> {triggerInterval = -900.000000}\"\n); \n\t URL = \t\t\t(null); \n\t lastModified = 2014-04-28 09:43:17 +0000; \n\t timeZone = \tGMT+0530 (GMT+5:30) offset 19800 \n}; \n\t location = \tany loacation; \n\t startDate = \t2014-07-24 10:00:00 +0000; \n\t endDate = \t\t2014-07-24 10:30:00 +0000; \n\t allDay = \t\t0; \n\t floating = \t0; \n\t recurrence = \tEKRecurrenceRule <0x16694c60> RRULE FREQ=DAILY;INTERVAL=1; \n\t attendees = \t(\n    \"EKAttendee <0x1668f2d0> {UUID = AB8950BF-702B-4E0C-9A6D-5CD1F61AA05A; name = Karthik Srinivasulu; email = ksrinivasulu@sapient.com; status = 2; role = 1; type = 1}\",\n    \"EKAttendee <0x16695e00> {UUID = A553802F-0083-497E-8D68-911864C28A03; name = Sushil Thanvi; email = sthanvi@sapient.com; status = 0; role = 1; type = 1}\",\n    \"EKAttendee <0x16695fa0> {UUID = 30E2351E-F501-42DD-B282-82D7350DC7FE; name = Sonam Chadha (X) Exit (5/6/2014); email = schadha2@sapient.com; status = 0; role = 1; type = 1}\"\n) \n};"

我可以通过以下方式获取标题、位置、注释日期

 for (EKEvent * event in matchingEvents) {
        NSMutableDictionary *entry = [[NSMutableDictionary alloc]      initWithObjectsAndKeys:
                                      event.title, @"title",
                                      event.location, @"location",
                                      event.notes, @"message",
                                      [df stringFromDate:event.startDate], @"startDate",
                                      [df stringFromDate:event.endDate], @"endDate",
                                       nil];
        [finalResults addObject:entry];
    }

我需要获取与会者列表和会议组织者。提前致谢!

【问题讨论】:

    标签: ios objective-c cordova ibm-mobilefirst


    【解决方案1】:

    只需使用attendeesorganizer 属性即可。

    【讨论】:

    • 抱歉,我是 Objective C 的新手,经过几次尝试,我无法将与会者列表转换为变量,所以根据对象的日志,如果有人可以分享一块代码,不胜感激!
    猜你喜欢
    • 1970-01-01
    • 2012-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多