[herein image the placeholder or input is not visible in TextInput 我已经尝试了所有方法,包括调整TextInput组件的高度,但是当我在ios中运行expo时输入不可见
这是我的InputComponent返回(
<Modal visible={props.visible} >
<View style={styles.inputView}>
<TextInput placeholder="Course Goal" style={styles.input}
onChangeText={(enteredGoal)=>(setGoalHandler(enteredGoal))}
value={enteredGoal}/>
<View style={styles.inputButtons}>
<View style={styles.button}><Button title="Cancel"
color="red" onPress={props.changeModal}/></View>
<View style={styles.button}><Button title="Add" onPress={()=>
{props.onAddGoal(enteredGoal),
setEnteredGoal('')}}/></View>
</View>
</View>
</Modal>
)
}
显然是个错误,您可以通过为输入设置颜色来解决它