标签: calendar-store

在iCal上获取/设置日历事件(以编程方式)

是否有任何客观的C API或对象可以让我访问iCal及其事件?我需要阅读给定日期的日历事件,并可选择设置新事件.

代码是普通C或目标C(在程序的GUI版本中).我在mac os 10.6上使用xcode.

非常感谢示例代码.

macos icalendar objective-c calendar-store

3
推荐指数
1
解决办法
8807
查看次数

找到了名为"location"的多个方法,其中包含不匹配的结果,参数类型或属性

我已经阅读了有关多种方法的其他问题,但仍然不知道如何修复我的代码.我很感激你的帮助.我在发生错误的语句周围放了一个*.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: 
      (NSIndexPath *)indexPath
    {
    static NSString *CellIdentifier = @"eventCell";
    EQCalendarCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
    {
       cell = [[EQCalendarCell alloc] initWithStyle:UITableViewCellStyleDefault
      reuseIdentifier:CellIdentifier];
    }
    cell.titleLabel.text = [[self.eventsList objectAtIndex:indexPath.row] title];
Run Code Online (Sandbox Code Playgroud)
    cell.locationLabel.text = [[self.eventsList objectAtIndex:indexPath.row] location];
Run Code Online (Sandbox Code Playgroud)
    NSDateFormatter *df = [[NSDateFormatter alloc] init];
    [df setDateFormat: @"dd-MM-yy HH:mm"];
    NSString *startDateString = [df stringFromDate:[[self.eventsList
    objectAtIndex:indexPath.row] startDate]];

    cell.startDateLabel.text = startDateString;

    NSString *endDateString = [df stringFromDate:[[self.eventsList
    objectAtIndex:indexPath.row] endDate]];


    cell.endDateLabel.text = endDateString;

    return cell;
    }
Run Code Online (Sandbox Code Playgroud)

提前感谢您的帮助.

calendar-store ios

2
推荐指数
1
解决办法
3123
查看次数

标签 统计

calendar-store ×2

icalendar ×1

ios ×1

macos ×1

objective-c ×1