20
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iosでテキストフィールドがキーボードの下に隠れないようにする

Last updated at Posted at 2015-09-08

Problem

  • テキストフィールドがキーボードの下に隠れる。
  • UIScrollViewを使った解決方法を選択したくない。

Solution

CocoaPodsでIQKeyboardManagerをインストールすれば、1行もコードを書かずに上記の問題が解決します。

プロジェクトの「Minimum iOS Target」が「iOS 8.0以上」の場合は「IQKeyboardManagerSwift」を、「iOS 8.0未満」の場合は「IQKeyboardManager」をCocoaPodでインストールします

# Podfile:

pod 'IQKeyboardManager'

これだけで完了です。

20
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?