iOS 获取操作系统的版本
[[[UIDevice
UITableView *tableView = nil;
float Version=[[[UIDevice currentDevice] systemVersion] floatValue];
if(Version>=7.0) {
tableView = (UITableView *)self.superview.superview;
}
else {
tableView=(UITableView *)self.superview;
}
NSIndexPath *indexPath= [tableView indexPathForCell:self];
indexPath = [NSIndexPath indexPathForRow:kImage1Index inSection:indexPath.row];
if ([tableView isKindOfClass:NSClassFromString(@"UITableView")] && tableView.style == UITableViewStyleGrouped) {
// need no background because otherwise this would overlap the rounded corners
_attributedTextContextView.backgroundColor = [DTColor clearColor];
}