Ios 文本输入垂直对齐

Ios 文本输入垂直对齐,ios,react-native,expo,Ios,React Native,Expo,有人知道如何使用自定义字体(内容和占位符)修复TextInput的垂直对齐吗?我尝试了所有这些: 为内容辩护:“中心” 对齐项目:“居中” textAlign:'中心' textAlignVertical:'中心' 什么都不管用!有什么建议吗 this.emailField=ref} 占位符=“电子邮件” style={style.loginInput} 占位符样式={style.loginInput} 可编辑={true} maxLength={40} 自动更正={false} sele

有人知道如何使用自定义字体(内容和占位符)修复TextInput的垂直对齐吗?我尝试了所有这些:

  • 为内容辩护:“中心”
  • 对齐项目:“居中”
  • textAlign:'中心'
  • textAlignVertical:'中心'
什么都不管用!有什么建议吗

this.emailField=ref}
占位符=“电子邮件”
style={style.loginInput}
占位符样式={style.loginInput}
可编辑={true}
maxLength={40}
自动更正={false}
selectionColor=“#9D9D9D”
占位符textcolor=“#9D9D9D”
autoCapitalize=“无”
keyboardType=“电子邮件地址”
returnKeyType=“下一步”
键盘外观=“深色”
textAlign=“中心”
underlineColorAndroid=“透明”
onSubmitEditing={()=>this.passwordField.focus()}
值={this.state.email}
onChangeText={(text)=>this.setState({email:text})}
/>
登录输入:{
宽度:“70%”,
身高:40,
marginBottom:8,
背景颜色:“#dbdb”,
fontFamily:“Neuzeit Grotesk常规”,
尺码:18,
为内容辩护:“中心”,
对齐项目:“居中”,
textAlign:'中心',
textAlignVertical:'中心',
},

我也有同样的问题。TextInput有一个默认的填充,
就我而言。我在
TextInput
样式中添加了
paddingTop:0
paddingBottom:0

请尝试删除边框底部

您尝试过线宽吗?您能添加代码吗?到目前为止您做了什么?我已经添加了代码@PritishVaidya根据@bennygenel的建议,您应该尝试使用
线宽
@PritishVaidya没有得到可接受的结果!是吗?
           <TextInput
            ref={ref => this.emailField = ref}
            placeholder="E-Mail"
            style={styles.loginInput}
            placeholderStyle={styles.loginInput}
            editable={true}
            maxLength={40}
            autoCorrect={false}
            selectionColor="#9D9D9D"
            placeholderTextColor="#9D9D9D"
            autoCapitalize="none"
            keyboardType="email-address"
            returnKeyType="next"
            keyboardAppearance="dark"
            textAlign="center"
            underlineColorAndroid="transparent"
            onSubmitEditing={() => this.passwordField.focus()}
            value={this.state.email}
            onChangeText={(text) => this.setState({ email: text })}
          />

  loginInput: {
    width: '70%',
    height: 40,
    marginBottom: 8,
    backgroundColor: '#dbdbdb',
    fontFamily: 'Neuzeit Grotesk Regular',
    fontSize: 18,
    justifyContent: 'center',
    alignItems: 'center',
    textAlign: 'center',
    textAlignVertical: 'center',
  },