Skip to content

Commit 7f0541e

Browse files
authored
Merge pull request #35 from jagnesh/ios_flicker_fix
fix: ios flicker
2 parents 5fb5879 + d23c3e3 commit 7f0541e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

ios/SplashView.mm

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,16 @@ + (instancetype)sharedInstance {
6363

6464
dispatch_async(dispatch_get_main_queue(), ^{
6565
if (splashWindow) {
66-
[UIView animateWithDuration:0.5 animations:^{
67-
splashWindow.rootViewController.view.alpha = 0.0;
68-
} completion:^(BOOL finished) {
69-
splashWindow.hidden = YES;
70-
splashWindow = nil;
71-
loadedViewController = nil;
72-
NSLog(@"✅ Splash Screen Hidden with fade");
73-
}];
66+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
67+
[UIView animateWithDuration:0. animations:^{
68+
splashWindow.rootViewController.view.alpha = 0.0;
69+
} completion:^(BOOL finished) {
70+
splashWindow.hidden = YES;
71+
splashWindow = nil;
72+
loadedViewController = nil;
73+
NSLog(@"✅ Splash Screen Hidden with fade");
74+
}];
75+
});
7476
} else {
7577
NSLog(@"⚠️ No active splash window found");
7678
}

0 commit comments

Comments
 (0)