I have 3 tables called radio, song, and artist controlled by favorite. Now I want to display different text for each table when there is nothing inside the table. But I want the text to be removed when there is something inside the table. I could display the text, by adding label into it.
if ([mainDataCenter.favoriteArtistArray count] == 0)
{
[label setTextColor:[UIColor whiteColor]];
[label setText:@"AUCUN FAVORI DE FICHE ARTISTE"];
}
else
{
[label setHidden:YES];
}
but after the text is hidden in one table ( meaning there is something added only to that particular table) but the other texts in other tables also disappeared.
- (void)tableView:(UITableView*)tv commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath*)indexPath
{
// If row is deleted, remove it from the list.
if (UITableViewCellEditingStyleDelete == editingStyle)
{
WebRadio *aRadio = [mainDataCenter.favoriteWebRadioArray objectAtIndex:indexPath.row];
[mainDataCenter removeWebRadioFromFavorite:aRadio];
// Animate the deletion from the table.
[tv deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
this is the code where I remove the things for the webradio table. ( the other 3 tables also the same) I appriciate if anyone could help me in this problem I've been having.