我正在使用react native开发一个应用程序,为启动画面创建了启动屏幕,问题是启动程序加载模块后。因此,在2-4秒内会出现空白屏幕。下面是Appdelegate.m的代码
[RNSplashScreen show];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"prescrip"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [UIColor whiteColor];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
在这种情况下请帮助我