Set tag and hidden for objects on custom UITableViewCell

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-06-06T19:38:17Z Indexed on 2010/06/06 19:42 UTC
Read the original article Hit count: 426

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

}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview