I am displaying a button in cutstom cell in UITableview
. How do I hide that button when it is not needed. For example: I am display received images count on button. In case count will be zero, I need to hide that button from cell.
contactviewController.m
if (![[arr objectAtIndex:4] isEqualToString:@"0"]) {
[cell1 setImg:[arr objectAtIndex:4]];
}
Customcell.m
-(void)setImg:(NSString *)_text
{
imgView.titleLabel.textColor = [UIColor whiteColor];
[imgView setTitle:_text forState:UIControlStateNormal];
}