File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -173,17 +173,17 @@ - (void)setStatusBarHidden:(bool)isHidden {
173173}
174174
175175- (void )setRootViewBackgroundColor : (std::string)color alpha : (float )alpha {
176- UIViewController *presentedViewController = RCTPresentedViewController ();
177- NSString *colorString = [NSString stringWithUTF8String: color.c_str ()];
178- UIColor *backgroundColor = colorFromHexString (colorString, alpha);
179-
180- if (backgroundColor == nil ) {
181- NSLog (@" 🦄 Unistyles: Couldn't set rootView to %@ color" , colorString);
176+ dispatch_async (dispatch_get_main_queue (), ^{
177+ UIViewController *presentedViewController = RCTPresentedViewController ();
178+ NSString *colorString = [NSString stringWithUTF8String: color.c_str ()];
179+ UIColor *backgroundColor = colorFromHexString (colorString, alpha);
182180
183- return ;
184- }
181+ if (backgroundColor == nil ) {
182+ NSLog ( @" 🦄 Unistyles: Couldn't set rootView to %@ color " , colorString);
185183
186- dispatch_async (dispatch_get_main_queue (), ^{
184+ return ;
185+ }
186+
187187 presentedViewController.view .backgroundColor = backgroundColor;
188188 });
189189}
You can’t perform that action at this time.
0 commit comments