我正在使用 EKEventEditViewController 向日历添加事件,但是我需要自定义表格视图,例如背景颜色和单元格属性。
我试过像这样循环遍历它的子视图,但没有运气。
失败的代码:
EKEventEditViewController *eventVc = [[EKEventEditViewController alloc] init];
eventVc.event = event;
eventVc.delegate = self;
eventVc.eventStore = eventStore;
eventVc.editViewDelegate = self;
for (UITableView *view in [eventVc.view subviews]) {
[view setBackgroundColor:[UIColor redColor]];
}
[self presentModalViewController:eventVc animated:YES];