2017-02-10 80 views
1

我试图使用react-native-keyboard-aware-scroll-view库(0.2.7)。它对我完全没有任何帮助。我究竟做错了什么?React Native KeyboardAwareScrollView不起作用

import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view' 

render() { 
    return (
    <KeyboardAwareScrollView> 
     <View> 
     <TextInput placeholder='hi1' /> 
     <TextInput placeholder='hi2' /> 
     <TextInput placeholder='hi3' /> 
     <TextInput placeholder='hi4' /> 
     <TextInput placeholder='hi5' /> 
     <TextInput placeholder='hi6' /> 
     <TextInput placeholder='hi7' /> 
     </View> 
    </KeyboardAwareScrollView> 
) 
} 

回答

3

现在建议使用KeyboardAvoidingView代替。它由React Native API提供。 ;)

+0

谢谢 - 我现在正在使用它,只是看到了一些奇怪的功能,所以我以为我会试用KeyboardAwareScrollView,但我会尝试修复这些怪癖。欣赏它。 –

+0

您遇到了哪些奇怪的功能? – whitep4nther

+0

我最终修复它,这是由于zIndex的。谢谢! –

相关问题