swift - 在现有 native 应用程序中使用 FlutterViewController 时关闭启动屏幕

标签 swift flutter

我正在使用 Flutter 中构建的 Android 应用程序片段来扩展我们现有的 Swift iOS 应用程序。它工作正常,但是当我转向 FlutterViewController 时,启动画面在加载时闪烁(大概是 flutter 启动画面)。有没有办法在后台执行加载/segue,并且仅在页面加载后才进行segue?

使用: swift 4.0, flutter

最佳答案

也许将FlutterViewController的splashScreenView设置为nil可以工作。

Specifies the view to use as a splash screen. Flutter’s rendering is asynchronous, so the first frame rendered by the Flutter application might not immediately appear when theFlutter view is initially placed in the view hierarchy. The splash screen view will be used as a replacement until the first frame is rendered.

The view used should be appropriate for multiple sizes; an autoresizing mask to have a flexible width and height will be applied automatically.

Declaration

@property (readwrite, strong, nonatomic) UIView *splashScreenView;

关于swift - 在现有 native 应用程序中使用 FlutterViewController 时关闭启动屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49763336/

相关文章:

iOS - 独立于时区的本地通知

swift 错误 : Extra argument in call

gridview - 如何在GridView.builder内部的内容之间显示AdMob原生广告?

flutter - 加载页面时清除列表

flutter - 使用提供程序和 snackbar 查找停用的小部件的祖先是不安全的

flutter - 当我在Flutter上离开页面时,Chewie视频将继续播放

objective-c - 将 (void *) 转换为 (SInt16 *) 到 Swift

ios - 如何使用模型类初始化 Core Data ManagedObjectContext?

ios - 编码协议(protocol)变量

firebase - 参数不匹配的闭包调用:flutter中的 '[]'函数