UITableViewCell 在IOS7的父视图是UITableViewWrapperView。

来源:互联网 发布:java开发单片机 编辑:程序博客网 时间:2024/05/16 08:28
iOS 获取操作系统的版本

[[[UIDevice currentDevice] systemVersion] floatValue]

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];        }



0 0