On iOS 11 device on deleting a UITableViewCell unexpected white background appears for some reason however all background colors are set to blue in storyboard (works fine on iOS10).
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete)
{
[self.bookmarks removeObjectAtIndex:indexPath.row];
[self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}
Tried all types of UITableViewRowAnimation, doesn't solve the problem.
Try it (you can choose appearanceWhenContainedInInstancesOfClasses instead).
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
...
[[UITableViewCell appearance] setBackgroundColor:[UIColor clearColor]];
return YES;
}
I tried everything that's possible and only thing that work was
adding
UITableViewCell.appearance().backgroundColor = UIColor.clear
in didFinishLaunchingWithOptions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With