I am trying to add a subview for a UViewViewCell and the design that I'm asking for this special subview (a The image should be bigger than the actual UITableViewCell, and thus partly his brothers and sisters must overlap.
So I set my table cell, created my image and added it to the contents of the cell:
// line for the UitableView is 45.0 F UIImage * image = [self-created cell thumbnail: some image]; UIImageView * thumbView = [[UIImageView alloc] initWithFrame: CGRectMake (150, -5, 55,55)]; ThumbView.transform = Cegiphentransfermarmatoconation (0.1f); ThumbView.image = Image; Cell.clipsToBounds = No; Cell.contentView.clipsToBounds = No; [Cell.contentView addSubview: thumbView];
When the image becomes 'overflow' in the bottom chamber, the image is always cut off, as shown here:
Do anyone know if I am trying to do with the current perspective, then what is possible?
Or do I understand these non-scrollable tableviews in order to drag these images to the UITBVV, so that the job can be quite easy.)
Updates:
Also have tried to add the following to no avail:
cell.opac = not; Cell.contentView.opaque = No; Cell.clearsContextBeforeDrawing = No; Cell.contentView.clearsContextBeforeDrawing = No; Cell.clipsToBounds = No; Cell.contentView.clipsToBounds = No;
I think the tableview presents the cell above the bottom, Therefore, the upper cell overlaps one cell one cell, to avoid this, you have to set the
backgroundcolor
of all the cells to+ [UIColor clearColor]
so that you Not see those overlap problems.But to set
backgroundcolor
,-tableView: cellForRowAtIndexPath:
does not make any sense. UIKit does a lot of stuff with a cell, before it is dragged, so it resets the property of thebackgroundcolor
.What should we do
backgroundColor settings later in the situation
Fortunately this- [UITableViewDelegate tableView: willDisplayCell: forRowAtIndexPath:]
We can implement this way :- (zero) table view: (UITableView *) tableView willDisplayCell: (UITableViewCell *) RowAtIndexPath for cell: (NSIndexPath *) indexPath {cell.backgroundColor = [UIColor clearColor]; }
Now we are setting the
backgroundcolor
before the cell is dragged.
Comments
Post a Comment