这个问题纠结了好久,才发现在AppDelegate.m里没有设置window的背景颜色。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor]; // 这句话
[self.window makeKeyAndVisible];
return YES;
}