2
1

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 3 years have passed since last update.

IQKeyboardManagerの使用に関すること

Posted at

IQKeyboardManagerを実装しようとして、podでIQKeyboardManagerとインポートしてもだめだった理由は
swiftとobject-Cの記載が違うからだった。

スクリーンショット 2021-02-19 10.31.38.png

完全に初歩的なミス…

AppDelegate.swiftにはこう書く↓

AppDelegate.swift

import IQKeyboardManagerSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

      IQKeyboardManager.shared.enable = true

      return true
    }
}

このように入れればできた。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?