2 // IQKeyboardManager.swift
3 // https://github.com/hackiftekhar/IQKeyboardManager
4 // Copyright (c) 2013-24 Iftekhar Qurashi.
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
13 // The above copyright notice and this permission notice shall be included in
14 // all copies or substantial portions of the Software.
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 // swiftlint:disable unused_setter_value
27 // swiftlint:disable identifier_name
28 // swiftlint:disable line_length
29 @available(iOSApplicationExtension, unavailable)
30 public extension IQKeyboardManager {
32 @available(*, unavailable, renamed: "resignOnTouchOutside")
33 @objc var shouldResignOnTouchOutside: Bool {
38 @available(*, unavailable, renamed: "playInputClicks")
39 @objc var shouldPlayInputClicks: Bool {
44 @available(*, unavailable, message: "This feature has been removed due to few compatibility problems")
45 @objc func registerTextFieldViewClass(_ aClass: UIView.Type,
46 didBeginEditingNotificationName: String,
47 didEndEditingNotificationName: String) {
50 @available(*, unavailable, message: "This feature has been removed due to few compatibility problems")
51 @objc func unregisterTextFieldViewClass(_ aClass: UIView.Type,
52 didBeginEditingNotificationName: String,
53 didEndEditingNotificationName: String) {
57 @available(iOSApplicationExtension, unavailable)
58 public extension IQKeyboardManager {
60 @available(*, unavailable, renamed: "toolbarConfiguration.manageBehavior")
61 @objc var toolbarManageBehaviour: IQAutoToolbarManageBehavior {
66 @available(*, unavailable, renamed: "toolbarConfiguration.useTextFieldTintColor")
67 @objc var shouldToolbarUsesTextFieldTintColor: Bool {
72 @available(*, unavailable, renamed: "toolbarConfiguration.tintColor")
73 @objc var toolbarTintColor: UIColor? {
78 @available(*, unavailable, renamed: "toolbarConfiguration.barTintColor")
79 @objc var toolbarBarTintColor: UIColor? {
84 @available(*, unavailable, renamed: "toolbarConfiguration.previousNextDisplayMode")
85 @objc var previousNextDisplayMode: IQPreviousNextDisplayMode {
91 @available(iOSApplicationExtension, unavailable)
92 public extension IQKeyboardManager {
93 @available(*, unavailable, renamed: "toolbarConfiguration.previousBarButtonConfiguration.image",
94 message: "To change, please assign a new toolbarConfiguration.previousBarButtonConfiguration")
95 @objc var toolbarPreviousBarButtonItemImage: UIImage? {
99 @available(*, unavailable, renamed: "toolbarConfiguration.previousBarButtonConfiguration.title",
100 message: "To change, please assign a new toolbarConfiguration.previousBarButtonConfiguration")
101 @objc var toolbarPreviousBarButtonItemText: String? {
105 @available(*, unavailable, renamed: "toolbarConfiguration.previousBarButtonConfiguration.accessibilityLabel",
106 message: "To change, please assign a new toolbarConfiguration.previousBarButtonConfiguration")
107 @objc var toolbarPreviousBarButtonItemAccessibilityLabel: String? {
112 @available(*, unavailable, renamed: "toolbarConfiguration.nextBarButtonConfiguration.image",
113 message: "To change, please assign a new toolbarConfiguration.nextBarButtonConfiguration")
114 @objc var toolbarNextBarButtonItemImage: UIImage? {
118 @available(*, unavailable, renamed: "toolbarConfiguration.nextBarButtonConfiguration.title",
119 message: "To change, please assign a new toolbarConfiguration.nextBarButtonConfiguration")
120 @objc var toolbarNextBarButtonItemText: String? {
124 @available(*, unavailable, renamed: "toolbarConfiguration.nextBarButtonConfiguration.accessibilityLabel",
125 message: "To change, please assign a new toolbarConfiguration.nextBarButtonConfiguration")
126 @objc var toolbarNextBarButtonItemAccessibilityLabel: String? {
131 @available(*, unavailable, renamed: "toolbarConfiguration.doneBarButtonConfiguration.image",
132 message: "To change, please assign a new toolbarConfiguration.doneBarButtonConfiguration")
133 @objc var toolbarDoneBarButtonItemImage: UIImage? {
137 @available(*, unavailable, renamed: "toolbarConfiguration.doneBarButtonConfiguration.title",
138 message: "To change, please assign a new toolbarConfiguration.doneBarButtonConfiguration")
139 @objc var toolbarDoneBarButtonItemText: String? {
143 @available(*, unavailable, renamed: "toolbarConfiguration.doneBarButtonConfiguration.accessibilityLabel",
144 message: "To change, please assign a new toolbarConfiguration.doneBarButtonConfiguration")
145 @objc var toolbarDoneBarButtonItemAccessibilityLabel: String? {
151 @available(iOSApplicationExtension, unavailable)
152 public extension IQKeyboardManager {
154 @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.accessibilityLabel")
155 @objc var toolbarTitlBarButtonItemAccessibilityLabel: String? {
160 @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.showPlaceholder")
161 @objc var shouldShowToolbarPlaceholder: Bool {
166 @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.font")
167 @objc var placeholderFont: UIFont? {
172 @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.color")
173 @objc var placeholderColor: UIColor? {
178 @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.buttonColor")
179 @objc var placeholderButtonColor: UIColor? {
185 @available(iOSApplicationExtension, unavailable)
186 public extension IQKeyboardManager {
188 @available(*, unavailable, renamed: "keyboardConfiguration.overrideAppearance")
189 @objc var overrideKeyboardAppearance: Bool {
194 @available(*, unavailable, renamed: "keyboardConfiguration.appearance")
195 @objc var keyboardAppearance: UIKeyboardAppearance {
201 @available(iOSApplicationExtension, unavailable)
202 public extension IQKeyboardManager {
204 typealias SizeBlock = (_ size: CGSize) -> Void
206 @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
207 @objc func registerKeyboardSizeChange(identifier: AnyHashable, sizeHandler: @escaping SizeBlock) {}
209 @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
210 @objc func unregisterKeyboardSizeChange(identifier: AnyHashable) {}
212 @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
213 @objc var keyboardShowing: Bool { false }
215 @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
216 @objc var keyboardFrame: CGRect { .zero }
218 // swiftlint:enable unused_setter_value
219 // swiftlint:enable identifier_name
220 // swiftlint:enable line_length