iOS 11/Xcode 9: UITableViewCell white background flickers on delete

前端 未结 3 1538
醉酒成梦
醉酒成梦 2021-02-08 02:21

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 iOS

相关标签:
3条回答
  • 2021-02-08 02:25

    Try it (you can choose appearanceWhenContainedInInstancesOfClasses instead).

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
        ...
    
        [[UITableViewCell appearance] setBackgroundColor:[UIColor clearColor]];
    
        return YES;
    }
    
    0 讨论(0)
  • 2021-02-08 02:28

    I tried everything that's possible and only thing that work was

    adding

    UITableViewCell.appearance().backgroundColor = UIColor.clear
    

    in didFinishLaunchingWithOptions

    0 讨论(0)
  • 2021-02-08 02:28

    Just a suggestion: Make sure all elements have a transparent background color or the light blue you are using. Apparently there is one that still has a white background color, could be the cell content view (if you have one) or the cell background.

    0 讨论(0)
提交回复
热议问题