0.引导页
1.首页
2.第二屏
3.列表页面
4.第四屏
5.账户页面
react-native run-ios
npm run start
需要登录自己的Apple ID,并且导出。按照官网指导调试即可,有问题参考
- 框架依赖
yarn add react-navigation
// or with npm
// npm install --save react-navigation
yarn add react-native-gesture-handler
// or with npm
// npm install --save react-native-gesture-handler
react-native link react-native-gesture-handler
yarn add react-native-reanimated
react-native link react-native-reanimated
yarn add react-navigation-animated-switch
yarn add redux react-redux
// npm install --save redux react-redux
yarn add redux-persist //为redux增加持久化功能
yarn add axios
// npm install --save axios
- 组件依赖
$ npm i react-native-swiper --save
removeClippedSubviews={false}
$ yarn add react-native-gesture-password
yarn add react-native-touch-id
react-native link react-native-touch-id
yarn add react-native-splash-screen
react-native link react-native-splash-screen
//iOS:
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RNSplashScreen.h" // here
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...other code
[RNSplashScreen show]; // here
// or
//[RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView];
return YES;
}
@end
- 样式依赖
yarn add react-native-elements
yarn add react-native-vector-icons
react-native link react-native-vector-icons
yarn add rn-placeholder
//////////
{/* <Placeholder
isReady={isReady}
animation="fade"
whenReadyRender={() => <ComponentLoaded />}
renderLeft={() => <Media hasRadius />}
renderRight={() => <Media />}
>
<Line width="70%" />
<Line />
<Line />
<Line width="30%" />
</Placeholder> */}
yarn add react-native-linear-gradient
react-native link react-native-linear-gradient