I want to use just KeyboardAwareScrollView without any functions on IOS and given below code for android.
I know that I need to use Platform.OS === 'ios' ? :
BUT I DON'T UNDERSTAND HOW TO REALISE IT. Please help me
render(){
return(
<KeyboardAwareScrollView
extraScrollHeight={100}
enableOnAndroid={true}
keyboardShouldPersistTaps='handled'
>
<TextInput
style={styles.inputContainerStyle}
label="Username"
value={this.state.username}
onChangeText={username => this.setState({ username })}
/>
</KeyboardAwareScrollView>
)
}
What I've tried below: (But it doesn't work)
<KeyboardAwareScrollView
Platform.OS === 'android' ?
(
extraScrollHeight={100}
enableOnAndroid={true}
keyboardShouldPersistTaps='handled'
) : null
>