从零开始-30日练习开发iOS APP-IQKeyboardManagerSwift Day-29

前言:
IQKeyboardManagerSwift 可以在开发App时让 UITextField、UITextView 防止键盘向上滑动和覆盖的问题,则可以在 PodFile 加入这个套件 IQKeyboardManagerSwift

正文:
加入方法和 Realm、youtube_ios_player_helpe 加入时一样
不过程序码要加在 AppDelegate.swift

预览图:

程序码:

import UIKit
import IQKeyboardManagerSwift
@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

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

      IQKeyboardManager.shared.enable = true

      return true
    }

    // MARK: UISceneSession Lifecycle

    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        // Called when a new scene session is being created.
        // Use this method to select a configuration to create the new scene with.
        return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
    }

    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
        // Called when the user discards a scene session.
        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
    }


}


<<:  第二十八天:查壳

>>:  27. Vue 与 API 串接练习

[C 语言笔记--Day10] 如何用 C 语言实作一个泛型函数

大纲 "##" 该如何使用 实作一个泛型函数 参考资料 1. "##&...

没想太多就用了 MongoDB 的结果 (上)

为什麽会用mongoDB 一开始决定要用 SQL 或 NoSQL时,因为考虑到 不用定义 schem...

【Day 12】Set 介绍

前言 今天要来介绍一下 Set Set set 储存的是 没有顺序性 且 不重复 的资料(会自动删除...

Day11-415. Add Strings

今日第一题:415. Add Strings Given two non-negative inte...

[Day 11] 第一主餐 pt.4-Djgnao,进化

在上一篇我们成功运行了django专案 今天我们要来加点东西,让我们的django成为一个web框架...