Skip to content

Commit 7159359

Browse files
authored
[iOS API breaking change] Make splashScreenView of FlutterViewController nullable (flutter#34743)
1 parent 3f093ea commit 7159359

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

shell/platform/darwin/ios/framework/Headers/FlutterViewController.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ FLUTTER_DARWIN_EXPORT
203203
*
204204
* The view used should be appropriate for multiple sizes; an autoresizing mask to
205205
* have a flexible width and height will be applied automatically.
206+
*
207+
* Set to nil to remove the splash screen view.
206208
*/
207-
@property(strong, nonatomic) UIView* splashScreenView;
209+
@property(strong, nonatomic, nullable) UIView* splashScreenView;
208210

209211
/**
210212
* Attempts to set the `splashScreenView` property from the `UILaunchStoryboardName` from the

shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm

+7
Original file line numberDiff line numberDiff line change
@@ -1135,4 +1135,11 @@ - (void)testFakeEventTimeStamp {
11351135
XCTAssertTrue(interval_micros / 1000 < tolerance_millis,
11361136
@"PointerData.time_stamp should be equal to NSProcessInfo.systemUptime");
11371137
}
1138+
1139+
- (void)testSplashScreenViewCanSetNil {
1140+
FlutterViewController* flutterViewController =
1141+
[[FlutterViewController alloc] initWithProject:nil nibName:nil bundle:nil];
1142+
[flutterViewController setSplashScreenView:nil];
1143+
}
1144+
11381145
@end

0 commit comments

Comments
 (0)