Skip to content

Commit 886d4bd

Browse files
authored
Merge pull request #992 from mendix/fix/MOO-1251-Splash-Screen
Fix splash screen issue
2 parents 8e85f08 + 968161d commit 886d4bd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ios/Dev/LaunchApp/LaunchAppViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ class LaunchAppViewController: UIViewController, QRViewDelegate {
123123
isDevModeEnabled: devModeEnabled)
124124

125125
let runtimeUrl: URL = AppUrl.forRuntime(AppPreferences.getAppUrl())!
126+
127+
let mxApp = MendixApp.init(nil, bundleUrl: url!, runtimeUrl: runtimeUrl, warningsFilter: devModeEnabled ? WarningsFilter.partial : WarningsFilter.none, isDeveloperApp: true, clearDataAtLaunch: clearDataSwitch.isOn, reactLoading: UIStoryboard(name: "LaunchScreen", bundle: nil))
128+
mxApp.splashScreenPresenter = SplashScreenPresenter()
126129

127-
ReactNative.instance.setup(MendixApp.init(nil, bundleUrl: url!, runtimeUrl: runtimeUrl, warningsFilter: devModeEnabled ? WarningsFilter.partial : WarningsFilter.none, isDeveloperApp: true, clearDataAtLaunch: clearDataSwitch.isOn, reactLoading: UIStoryboard(name: "LaunchScreen", bundle: nil)))
130+
ReactNative.instance.setup(mxApp)
128131
}
129132
}
130133

ios/StoryBoardSplash.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ + (void)showStoryBoard:(NSString *)name inRootView:(UIView *)rootView {
1616
}
1717

1818
+ (void)hideStoryBoard {
19-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
19+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
2020
[UIView animateWithDuration:0.3
2121
delay:0
2222
options:UIViewAnimationOptionCurveEaseIn

0 commit comments

Comments
 (0)