react-native-ios 相关问题

React-native-ios:指与react-native ios开发相关的所有内容。 react-native ios中的组件,样式,路由和本机API访问。

ios 键盘覆盖了位于屏幕底部的输入

ios 键盘覆盖了位于屏幕底部的输入。怎么解决这个麻烦呢? 这是代码。 ... ios 键盘覆盖了位于屏幕底部的输入。怎么解决这个烦恼呢? 这是代码。 <Content style={styles.content}> <Form> <Item style={{borderBottomColor:'#42e8f4'}}> <Icon active name='mail' style={{color: '#42e8f4'}} /> <Input placeholder='Email'placeholderTextColor= '#42e8f4' style={{color:'#0dc49d'}}/> </Item> <Item style={{ borderBottomColor:'#42e8f4'}}> <Icon active name='lock' style={{color: '#42e8f4'}} /> <Input secureTextEntry={true} placeholder='Password'placeholderTextColor= '#42e8f4' style={{color:'#42e8f4'}}/> </Item> </Form> <ListItem style={{borderBottomWidth:0,borderTopWidth:0,borderBottomColor:'#42e8f4'}}> <Button transparent onPress={() => this.props.navigation.navigate("Signup")}> <Text style={{color:'#42e8f4'}}>Create Account</Text> </Button> <Button transparent onPress={() => this.props.navigation.navigate("Forgetpass")}> <Text style={{color:'#42e8f4'}}>Forget Password</Text> </Button> </ListItem> <Button full style={{backgroundColor:'#42e8f4'}} onPress={() => this.props.navigation.navigate("Welcome")}> <Text style={{color: '#FFF'}}>Sign In</Text> </Button> </Content> const styles = { content:{ position:'absolute', bottom:10, left:0, right:0 }, } 我正在使用 Native-Base。这个问题如何解决? 查看文档 React Native Keyboard 避免视图。 是一个解决视图常见问题的组件 移开虚拟键盘。它可以自动 根据位置调整其位置或底部填充 键盘。 来自如何让你的 React Native 应用在键盘弹出时优雅响应文章中的示例 return ( <KeyboardAvoidingView style={styles.container} behavior="padding" > <Image source={logo} style={styles.logo} /> <TextInput placeholder="Email" style={styles.input} /> <TextInput placeholder="Username" style={styles.input} /> <TextInput placeholder="Password" style={styles.input} /> <TextInput placeholder="Confirm Password" style={styles.input} /> <View style={{ height: 60 }} /> </KeyboardAvoidingView> ); 您可以使用这个库react-native-keyboard-aware-scroll-view只需将其作为组件的容器 这是我的解决方案,适用于 ios 和 android : return ( <ScrollView contentContainerStyle={{ flexGrow: 1 }}> <KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : ""} style={styles.container}> ........ // Your input fields ........ </KeyboardAvoidingView> </ScrollView> ) const styles = StyleSheet.create({ container: { flex: 1 }, }); 带有填充的键盘避免视图隐藏了以下代码中用于此用途的按钮 <KeyboardAvoidingView behavior={"height"} style={{flex: 1}> <ScrollView contentContainerStyle={{ flexGrow: 1 }}> ........ </ScrollView> </KeyboardAvoidingView> 对我有用: 在项目导航器中选择 info.plist 右键单击顶部的“信息属性列表”,选择“添加行” 从下拉列表中选择“启动屏幕界面文件基本名称”。 将类型设置为“String”。 我将“LaunchScreen”(不带引号)作为值。 当您使用 ScrollView 并且每次单击输入时都会添加额外的填充时的解决方案: <KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : undefined} style={{flex: 1}> <ScrollView contentContainerStyle={{ flexGrow: 1 }}> ........ </ScrollView> </KeyboardAvoidingView>

回答 6 投票 0

如何摆脱“CocoaPods 找不到 pod 的兼容版本”?我尝试更新 cocoapod 和 pod repo

在我的react-native项目中,我想更新所有依赖项,因此我运行以下命令: 1.要更新到所有软件包的新主要版本,请安装 npm-check-updates 软件包 gl...

回答 2 投票 0

React-native-reanimated 动画在 ios 上不起作用,在 android 上起作用

我有一个底部栏的动画,位于选项卡文本下方,该动画在 android 中工作正常,但在 ios 中不行。我正在使用react-native-reanimated。 任何帮助,将不胜感激。 谢谢...

回答 2 投票 0

运行react-native run-ios时出错。错误:找不到模块“metro-config”

我正在使用react-native run-is命令通过终端运行React-native项目。我想在模拟器中运行它。首先我运行 npm install ,然后运行 react-native run-ios 。它显示错误 错误:不能...

回答 3 投票 0

如何检查图像是否从 url [react-native] 加载

这个想法是检查图像是否从网址加载,如果没有,我将显示另一个图像 从 'react' 导入 React,{useState} 从 'react-

回答 2 投票 0

React Native 中嵌套元素的辅助功能焦点顺序不正确

我正在一个混合匹配应用程序中工作,我们在几个模块中使用 React Native 组件。在本例中,我有一个表格视图,我们在其中的一些单元格中添加了 RN 组件。 我能够启用

回答 3 投票 0

react-native ios 获取mac地址

在react-native应用程序中,我使用react-native-device-info库来获取设备的MAC地址。 但我只能获取Android设备的mac地址。我找不到图书馆...

回答 1 投票 0

如何在react-native中提示用户新应用发布?

我们如何配置react-native来通知用户新应用程序发布。

回答 4 投票 0

如何将EXPO项目转移到React Native项目?

我用Expo工具构建了一个应用程序..但现在我要在没有expo的情况下移动到React Native ..我尝试在React Native中创建一个新项目,然后传输我编写的代码并安装

回答 1 投票 0

React Native iOS 构建失败,“多个命令产生”错误

我们正在开发一个 React Native 项目。我的一位团队成员在 Linux 上添加了一些本机模块并链接了 android。那时我正在尝试链接 iOS 中的内容,但构建总是失败并显示

回答 7 投票 0

React Native - pod 安装问题“无法加载此类文件......node_modules/react-native/scripts/react_native_pods”

当我有一个 React Native 项目时......并且当我运行 pod install 时,它给出了以下错误 无效的 `Podfile` 文件:无法加载此类文件 -- /myPath/node_modules/react-native/scripts/

回答 17 投票 0

应用程序关闭时无法更新徽章计数 - 反应原生 iOS

我们正在使用 React Native Firebase 版本 6 消息传递来处理推送通知。从远程通知内容来看,我们无法在 ios 上增加/减少徽章计数。所以我们是你...

回答 1 投票 0

React Native:如何检查是否已授予地理位置权限

我知道我可以使用 React Native 在 iOS 上请求地理定位权限,如下所示: 等待 navigator.geolocation.requestAuthorization() 但是,我如何知道用户是否授予了权限? ...

回答 2 投票 0

在 85 个 gem 中找不到“ffi”(>= 1.3.0)(Gem::MissingSpecError)在 pod 安装上反应原生 IOS

嗨,我正在尝试在 mac mini 上运行我的 React Native 应用程序。我可以运行另一个应用程序也可以运行这个应用程序,但是当我在终端中编写 pod install 时,它会出现此错误。 1:来自/System/Library/Frameworks/Ruby。

回答 7 投票 0

错误:main.jsbundle 不存在 - React Native 0.60.4

我正在尝试在 App store 中发布我的第一个 React Native 应用程序,当我在 Xcode 中构建时: 产品 > 档案 出现一些错误,但我已经有 main.jsbundle main.jsbundle 不存在。 T...

回答 7 投票 0

iOS 上的 React Native 构建错误 - 使用不同类型的 typedef 重新定义('uint8_t'(又名'unsigned char')与'enum Clockid_t')

将 React Native 从 0.61.5 升级到 0.63.2 后,Flipper 在 IOS 上导致错误,因为 typedef 重新定义为不同类型(“uint8_t”(又名“unsigned char”)与“enum Clockid_t”) 在github上有...

回答 14 投票 0

如何在 React Native 中将字符串响应连接到数组中?

我正在从内容列表中访问一个字符串,并且我想用逗号连接字符串,但是每当我尝试这样做时,样式都会破坏网络和移动设备。 下面是代码...

回答 2 投票 0

“npx react-native run-ios”正在选择不存在的模拟器

根据https://reactnative.dev/docs/environment-setup,我正在尝试在iOS模拟器上运行示例项目 当我运行命令 npx react-native run-ios 时出现错误 信息找到 Xcode 工作区“

回答 6 投票 0

世博会在应用程序中自动填写OTP短信

如何使用从 2FA 提供商收到的消息自动填写我的 OTP 字段?我看到很多应用程序在 iOS 上的本机键盘上方提供了建议。在我看来,这就像一个本地的东西,应该可以工作......

回答 1 投票 0

如何修复:配置项目时出现问题

我在react-native中构建了一个项目,它在我的计算机上运行良好,但是在更改其位置后,问题开始发生。我使用“yarn add @react-native-community/async-

回答 3 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.