Using UIView animateWithDuration, I’m setting a UITableView alpha to 0 so that it fades away in a disappearing animation. However, I’m noticing that when the UITableView fades, there are areas on each cell that turn black before fading. If there is an image, the whole area behind it turns black while fading, and usually the inset space on both the left and right edge turn black. I’ve tried setting all of the background colors of the UITableViewCell subviews to white and it still doesn’t work.
This tableview is not embedded in a UITableViewController. Instead, it’s a separate floating tableView that I’m using as a menu.
Here is an example of what happens when it’s fading:

Here is the code I’m using as well
[UIView animateWithDuration:ImageViewControllerBarsAnimationDuration delay:0 options: UIViewAnimationOptionAllowUserInteraction animations:^
{
if (self.menu.superview)
{
self.menu.alpha = 0;
}
}
completion:^(BOOL finished)
{
if (self.menu.superview)
{
[self.menu removeFromSuperview];
self.menu.alpha = 1;
}
}];
+
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"Cell";
UITableViewCell *tableViewCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (tableViewCell == nil)
{
tableViewCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease];
}
[[tableViewCell textLabel] setFont:[UIFont fontWithName: @"Helvetica-Bold" size: 17]];
[[tableViewCell textLabel] setText: [self.menuItems objectAtIndex:0]];
[[tableViewCell imageView] setImage: [self.menuItems objectAtIndex:1]];
return tableViewCell;
}
DTS gave me a solution to this, have to do the following:
Then inside of
cellForRowAtIndexPathmethod have to do this: