Two steps:
add this code in viewDidLoad
- (void)viewDidLoad
{
emptyplaceholder = [[UILabel alloc] initWithFrame:CGRectMake(80, 100, 640, 100)];
emptyplaceholder.text = NSLocalizedString(@"No shift changes...", "no shift changes");
emptyplaceholder.alpha = 0.2;
[self.view addSubview:emptyplaceholder];
}
add this code in controllerDidChangeContent:
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
// The fetch controller has sent all current change notifications, so tell the table view to process all updates.
if (self.fetchedResultsController.fetchedObjects.count > 0)
emptyplaceholder.hidden = YES;
else
emptyplaceholder.hidden = NO;
[self.tableView endUpdates];
}
so the UILable will disappear when have date cell, when delete to no data in table, the label will show again.