多个TableViewCells中的一个UIView

时间:2014-04-03 19:33:58

标签: ios iphone objective-c ipad uiview

我有UITableViewCell,其中包含UIView

UIView大于UITableViewCell,也应在上面的cell中显示。

clipsToBounds=NO

没用。

仅当我从上部单元格中删除内容并将背景颜色设置为清除时,此功能才有效。 这意味着,我的上层单元格中的内容覆盖了我的UIView,这就是我试图调用bringSubViewToFront的原因,但这也没有用。

我做错了什么?

这是我将自定义UIView添加到单元格contentView的方式:

CustomView *view=[[CustomView alloc] initWithFrame:CGRectMake(0, 0, [DeviceInformation getWidth], [self tableView:tableView heightForRowAtIndexPath:indexPath])];
[cell.contentView addSubview:view];

并在我的CustomView我添加了另一个UIView,然后应该在多个单元格中显示。

谢谢!

0 个答案:

没有答案