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

前端 未结 3 1539
醉酒成梦
醉酒成梦 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;
    }
    

提交回复
热议问题