# ImageView **Repository Path**: andy1215/image-view ## Basic Information - **Project Name**: ImageView - **Description**: ImageView ImageView ImageView - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-17 - **Last Updated**: 2026-04-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 这是一个新的 [**React Native**](https://reactnative.dev) 项目,使用 [`@react-native-community/cli`](https://github.com/react-native-community/cli) 初始化。 ## 功能特性 - 🎬 本地视频播放器 - 📁 从设备选择视频文件 - ⏯️ 播放/暂停控制 - ⏩ 快进快退(±10 秒) - 📊 进度条显示 - 🌓 深色/浅色模式支持 - ⚡ 倍速播放(0.5x - 2.0x) - 🔄 屏幕旋转(0°/90°/180°/270°) - 📱 重力感应自动旋转 - 🖐️ 手势控制(水平滑动调节亮度,垂直滑动调节音量) - 🔒 屏幕方向锁定 - 📺 全屏模式 # 快速开始 > **注意**: 在继续之前,请确保已完成 [环境设置](https://reactnative.dev/docs/set-up-your-environment) 指南。 ## 步骤 1:启动 Metro 首先,需要运行 **Metro**,这是 React Native 的 JavaScript 构建工具。 从 React Native 项目根目录运行以下命令启动 Metro 开发服务器: ```sh # 使用 npm npm start # 或使用 Yarn yarn start ``` ## 步骤 2:构建并运行应用 Metro 运行后,从 React Native 项目根目录打开新的终端窗口/面板,使用以下命令构建并运行 Android 或 iOS 应用: ### Android ```sh # 使用 npm npm run android # 或使用 Yarn yarn android ``` ### iOS 对于 iOS,请记得安装 CocoaPods 依赖(仅在首次克隆或更新原生依赖后需要)。 首次创建新项目时,运行 Ruby bundler 来安装 CocoaPods: ```sh bundle install ``` 然后,每次更新原生依赖后,运行: ```sh bundle exec pod install ``` 更多信息,请访问 [CocoaPods 入门指南](https://guides.cocoapods.org/using/getting-started.html)。 ```sh # 使用 npm npm run ios # 或使用 Yarn yarn ios ``` 如果一切配置正确,你应该能看到新应用在 Android 模拟器、iOS 模拟器或连接的设备上运行。 这是运行应用的一种方式——你也可以直接从 Android Studio 或 Xcode 构建。 ## 步骤 3:修改应用 成功运行应用后,让我们做些修改! 用你喜欢的文本编辑器打开 `App.tsx` 并进行一些更改。保存后,应用会自动更新并反映这些更改——这由 [Fast Refresh](https://reactnative.dev/docs/fast-refresh) 支持。 当需要强制重新加载时(例如重置应用状态),可以执行完全重新加载: - **Android**: 按两次 R 键或从 **Dev Menu** 中选择 **"Reload"**,通过 Ctrl + M(Windows/Linux)或 Cmd ⌘ + M(macOS)访问。 - **iOS**: 在 iOS 模拟器中按 R 键。 ## 恭喜!:tada: 你已成功运行并修改了 React Native 应用。:partying_face: ### 接下来是什么? - 如果想将此新的 React Native 代码添加到现有应用程序中,请查看 [集成指南](https://reactnative.dev/docs/integration-with-existing-apps)。 - 如果你想了解更多关于 React Native 的知识,请查看 [文档](https://reactnative.dev/docs/getting-started)。 # 故障排除 如果在执行上述步骤时遇到问题,请参阅 [故障排除](https://reactnative.dev/docs/troubleshooting) 页面。 # 学习更多 要了解有关 React Native 的更多信息,请查看以下资源: - [React Native 官网](https://reactnative.dev) - 了解更多关于 React Native。 - [快速开始](https://reactnative.dev/docs/environment-setup) - React Native **概览** 及环境设置。 - [基础知识](https://reactnative.dev/docs/getting-started) - React Native **基础知识** 的 **引导教程**。 - [博客](https://reactnative.dev/blog) - 阅读最新的官方 React Native **博客** 文章。 - [`@facebook/react-native`](https://github.com/facebook/react-native) - React Native 的开源 GitHub **仓库**。