<KeyboardAvoidingView>
를 사용하여 해결할 수 있다공식문서
- behavior
Specify how to react to the presence of the keyboard.
(Android and iOS both interact with this prop differently. On both iOS and Android, setting behavior is recommended)
- TYPE : enum('height', 'position', 'padding')- contentContainerStyle
The style of the content container (View) when behavior is 'position'.
- TYPE: View Style- enabled
Enabled or disabled KeyboardAvoidingView.
- default => boolean: true- keyboardVerticalOffset
This is the distance between the top of the user screen and the react native view, may be non-zero in some use cases.
- default => numbe:0
<KeyboardAvoidingView
behavior="height"
keyboardVerticalOffset={160 * REM}
style={{marginTop: Platform.OS === 'ios' ? 48 * REM : 0, flex: 1}}>
<ScrollView>
....
<View
style={{
height: 1 * REM,
backgroundColor: gray6,
marginTop: 30 * REM,
}}
/>
</ScrollView>
<View style={{backgroundColor: gray8, height: 90 * REM}}>
<View
style={{
marginTop: 18 * REM,
marginLeft: 16 * REM,
flexDirection: 'row',
}}>
...
<View
style={{
width: 46 * REM,
height: 29 * REM,
backgroundColor: gray5,
borderRadius: 4 * REM,
justifyContent: 'center',
alignItems: 'center',
}}>
<Text
color={white}
size={14 * REM}
style={{padding: 20 * REM}}>
제출
</Text>
</View>
</View>
</View>
</View>
</KeyboardAvoidingView>