1. 程式人生 > >React Native 解決iOS上鍵盤遮擋TextInput

React Native 解決iOS上鍵盤遮擋TextInput

React Native 鍵盤遮擋TextInput問題的問題

IOS解決方案: IQKeyboardManager,

使用cocoaPods安裝

1. 進入專案的ios資料夾下

2. 新建檔案 Podfile

3. 使用文字編輯器增加以下內容

platform:ios,'9.3'
target "<your Target name>" do
pod 'IQKeyboardManager'
end

4. 命令列執行: pod install

5. done

安裝之後出現警告

解決方法:進入專案 Target -> Build Settings -> Linking-> Other linker flags ->追加  $(inherited)