首页 > 解决方案 > 如何在 iphone 6s 和 5s 的键盘上方隐藏图标和文本密码

问题描述

我的屏幕有 3 个TextInput:电子邮件、重新电子邮件和密码。这是我的代码:

 render() {
        return (
            <View>
                <TextInput
                    placeholder="Mail Address"
                    onSubmitEditing={() => { this.remail.focus(); }}
                    keyboardType={"email-address"}
                    blurOnSubmit={false}
                />
                <TextInput
                    secureTextEntry={false}
                    ref={(input) => { this.remail = input; }}
                    keyboardType={"email-address"}
                    onSubmitEditing={() => { this.password.focus(); }}
                    placeholder="Enter the mail address again"
                />
                <TextInput
                    secureTextEntry={true}
                    ref={(input) => { this.password = input; }}
                    placeholder="Password"
                />
            </View>
        )
    }

TextInput重新发送电子邮件焦点时,键盘上方有一个图标和文本密码,如照片: 在此处输入图像描述

TextInput remail对焦时如何隐藏它?p/s : 仅在 Iphone 5s 和 6s 中显示,Iphone 6 和 5 在键盘上方不显示图标和文字 谢谢!

标签: javascriptreact-native

解决方案


从中删除 secureTextEntry={false}

               <TextInput
                    secureTextEntry={false}
                    ref={(input) => { this.remail = input; }}
                    keyboardType={"email-address"}
                    onSubmitEditing={() => { this.password.focus(); }}
                    placeholder="Enter the mail address again"
                />

推荐阅读