rootview의 백그라운드 색상을 설정하는 법을 알아보기전에
왜 이것을 설정하게 되었는지
문제의 원인, 근원을 짚어본다.
react-native로 개발된 앱을 실행했을때
iOS 에서만 white flash 현상이 나타났다.
https://stackoverflow.com/questions/5618163/displaying-splash-screen-for-longer-than-default-seconds
Displaying splash screen for longer than default seconds
Is it possible to display the Default.png for a specified number of seconds? I have a client that wants the splash screen displayed for longer than its current time. They would like it displayed f...
stackoverflow.com
이런 내용도 있었지만
살펴보니 내게는 모두 적용되지 않는일들이었다.
기본적으로 black 컬러를 가져가는 우리 앱의 특성상
배경색만 검정으로 설정하면 되는데,
위 글에서는
splash-screen의 설정에 대해 다루는 내용이 대부분이 었기 때문.
그러던중
Changing the React Native RootView Background Color (for iOS and Android)
While developing my React Native KeyGen Music Player app for iOS, I decided to create a custom 90’s retro theme. This required me to change…
medium.com
이런 글을 찾게되었다.
rootview의 색상을 지정하는것!
// AppDelegate.m -> didFinishLaunchingWithOptions
if (@available(iOS 13.0, *)) {
rootView.backgroundColor = [UIColor blackColor];
} else {
rootView.backgroundColor = [UIColor blackColor];
}
systemcolor, whitecolor 등으로
설정되어있던 값을 모두
blackColor로 변경해주었다.