Set tag and hidden for objects on custom UITableViewCell
- by Rob
I am re-using Apple's AdvancedTableViewCells example to create a custom, fast-scrolling tableview. Specifically, I am using their CompositeSubviewBasedApplicationCell method which draws the content on the tableviewcell with drawRect
Everything works, but how do you hide a label or set the tag for a label or image using their method? Doing it this way is pretty new to me (without IB), so I apologize ahead of time if it's something easy.
The code that sets the cell content is:
- (void)drawRect:(CGRect)rect
{
[_cell.animalIcon drawAtPoint:CGPointMake(5.0, 5.0)];
[_cell.animalName drawAtPoint:CGPointMake(93.0, 25.0)];
_highlighted ? [[UIColor whiteColor] set] : [[UIColor colorWithWhite:0.23 alpha:1.0] set];
[_cell.animalDescription drawAtPoint:CGPointMake(100.0, 54.0) withFont:[UIFont boldSystemFontOfSize:13.0]];
[_cell.animalNameString drawAtPoint:CGPointMake(93.0, 5.0) withFont:[UIFont boldSystemFontOfSize:13.0]];
}