[iOS API breaking change] Make splashScreenView of FlutterViewController nullable (flutter/engine#34743)

This commit is contained in:
Wu Zhong
2022-07-28 04:13:03 +08:00
committed by GitHub
parent 97e03b7033
commit 2452603d31
2 changed files with 10 additions and 1 deletions

View File

@@ -203,8 +203,10 @@ FLUTTER_DARWIN_EXPORT
*
* The view used should be appropriate for multiple sizes; an autoresizing mask to
* have a flexible width and height will be applied automatically.
*
* Set to nil to remove the splash screen view.
*/
@property(strong, nonatomic) UIView* splashScreenView;
@property(strong, nonatomic, nullable) UIView* splashScreenView;
/**
* Attempts to set the `splashScreenView` property from the `UILaunchStoryboardName` from the

View File

@@ -1135,4 +1135,11 @@ extern NSNotificationName const FlutterViewControllerWillDealloc;
XCTAssertTrue(interval_micros / 1000 < tolerance_millis,
@"PointerData.time_stamp should be equal to NSProcessInfo.systemUptime");
}
- (void)testSplashScreenViewCanSetNil {
FlutterViewController* flutterViewController =
[[FlutterViewController alloc] initWithProject:nil nibName:nil bundle:nil];
[flutterViewController setSplashScreenView:nil];
}
@end