LoginSignup
0
2

More than 1 year has passed since last update.

Swift for ios app のTextFieldの移動方法

Posted at

Swift for iOS APP メモ

キーボードをあげて表示を行う

チャットなどアプリでTextFieldに文字を打ち込みたいときに、TextFieldをキーボードの上にあげる方法

AppDelegate.swift に以下のコードを追加する。

AppDelegate.swift
import IQKeyboardManagerSwift

func application()

     IQKeyboardManager.shared.enable = true
     IQKeyboardManager.shared.enableAutoToolbar = false
     IQKeyboardManager.shared.shouldResignOnTouchOutside = true


これのみで完了

0
2
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
0
2