此代码是否可用于自定义 EKEventViews 的颜色(附加代码)?即它应该可以作为苹果rev 的IOS 版本。
如果没有,你会推荐什么代码?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
self.detailViewController = [[EKEventViewController alloc] initWithNibName:nil bundle:nil];
detailViewController.event = [self.eventsList objectAtIndex:indexPath.row];
[self.navigationController pushViewController:detailViewController animated:YES];
// CODE UNDER QUESTION HERE
UITableView *tv = (UITableView*)[detailViewController.view.subviews objectAtIndex:0];
[tv setBackgroundColor:[UIColor yellowColor]];
UIView *v = (UIView*)[[tv visibleCells] objectAtIndex:0];
v.backgroundColor = [UIColor greenColor];
}