zoukankan      html  css  js  c++  java
  • rn-splash-screen 启动页 ios

    1.删除iOS工程文件夹下的 LaunchScreen.xib 文件

    2.

    3.  如果第4步不一样的样式,可以重新走这个图片的步骤就行

    4.进入iOS工程的AppDelegate.m中做如下修改:


    #import <RCTSplashScreen/RCTSplashScreen.h>

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    // [...]

    RCTRootView *rootView = // [...]

    // Show splash screen (rn-splash-screen)
    [RCTSplashScreen show:rootView]; //**********添加这行代码,注意:这行代码必须在 RCTRootView *rootView = // [...] 的下面************

    // [...]
    }

    5. 在入口文件引入
    import SplashScreen from "rn-splash-screen";

    componentDidMount(){
    //隐藏闪屏页,闪屏页用的是第三方库,rn-splash-screen
    setTimeout(() => {
        SplashScreen.hide();
      }, 2000);//延时2秒消失
    }

    }

  • 相关阅读:
    vector数组的翻转与排序
    20210310日报
    vector数组的遍历
    vector数组的删除
    vector数组的插入
    20210304日报
    20210303日报
    20210302日报
    计算datetime.date n个月后(前)的日期
    pandas 重命名MultiIndex列
  • 原文地址:https://www.cnblogs.com/lude1994/p/10735797.html
Copyright © 2011-2022 走看看