iOS Launch screen in React Native

后端 未结 13 953
时光取名叫无心
时光取名叫无心 2020-12-04 05:44

I\'m working with a React Native app and I\'m trying to set a customize launch screen but I\'m not able to.

React Native creates a LaunchScreen.xib by default, so I\

13条回答
  •  孤街浪徒
    2020-12-04 06:10

    For me on XCode 10.1 and react-native 59.2 I had to go through the additional steps after already adding the images, storyboard and 1 universal image.

    • Right click on the image, click Show in Finder, then edit your Contents.json file
    • Add the image to the 2x and 3x sections
    • Go to the Launch Screen storyboard, with the "ruler" menu
    • Make sure only the inside red arrows are on, not the outside red arrows
    • Click "Safe Area Relative Margins"

    Image should now be centered on all size iPhones (tested on Portrait).

提交回复
热议问题