未验证 提交 0d028778 编写于 作者: D Dan Field 提交者: GitHub

Avoid a never-disappearing splash screen if the engine came from somewhere else on iOS (#6834)

* Ignore multiple attemps to set splash screen, print warning
上级 71ade827
......@@ -344,6 +344,19 @@
}
- (void)setSplashScreenView:(UIView*)view {
if (!view) {
// Special case: user wants to remove the splash screen view.
[self removeSplashScreenViewIfPresent];
} else if (_splashScreenView) {
FML_LOG(ERROR) << "Attempt to set the FlutterViewController's splash screen multiple times was "
"ignored. The FlutterViewController's splash screen can only be set once. "
"This condition can occur if a running FlutterEngine instance has been "
"passed into the FlutterViewController and a consumer later called "
"[FlutterViewController setSplashScreen:]. Setting the splash screen on a "
"FlutterViewController with an already running engine is not supported, as "
"the rasterizer will already be running by the time the view is shown.";
return;
}
_splashScreenView.reset([view retain]);
_splashScreenView.get().autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册