c2cef98cd5311c570c9dcd8386c429a2f0a2226c
[mirrors/VoiceChatSdk_iOS.git] /
1 //
2 //  IQKeyboardManager.swift
3 //  https://github.com/hackiftekhar/IQKeyboardManager
4 //  Copyright (c) 2013-24 Iftekhar Qurashi.
5 //
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:
12 //
13 // The above copyright notice and this permission notice shall be included in
14 // all copies or substantial portions of the Software.
15 //
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
22 // THE SOFTWARE.
23
24 import UIKit
25
26 // swiftlint:disable unused_setter_value
27 // swiftlint:disable identifier_name
28 // swiftlint:disable line_length
29 @available(iOSApplicationExtension, unavailable)
30 public extension IQKeyboardManager {
31
32     @available(*, unavailable, renamed: "resignOnTouchOutside")
33     @objc var shouldResignOnTouchOutside: Bool {
34         get { false }
35         set { }
36     }
37
38     @available(*, unavailable, renamed: "playInputClicks")
39     @objc var shouldPlayInputClicks: Bool {
40         get { false }
41         set { }
42     }
43
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) {
48     }
49
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) {
54     }
55 }
56
57 @available(iOSApplicationExtension, unavailable)
58 public extension IQKeyboardManager {
59
60     @available(*, unavailable, renamed: "toolbarConfiguration.manageBehavior")
61     @objc var toolbarManageBehaviour: IQAutoToolbarManageBehavior {
62         get { .bySubviews }
63         set { }
64     }
65
66     @available(*, unavailable, renamed: "toolbarConfiguration.useTextFieldTintColor")
67     @objc var shouldToolbarUsesTextFieldTintColor: Bool {
68         get { false }
69         set { }
70     }
71
72     @available(*, unavailable, renamed: "toolbarConfiguration.tintColor")
73     @objc var toolbarTintColor: UIColor? {
74         get { nil }
75         set { }
76     }
77
78     @available(*, unavailable, renamed: "toolbarConfiguration.barTintColor")
79     @objc var toolbarBarTintColor: UIColor? {
80         get { nil }
81         set { }
82     }
83
84     @available(*, unavailable, renamed: "toolbarConfiguration.previousNextDisplayMode")
85     @objc var previousNextDisplayMode: IQPreviousNextDisplayMode {
86         get { .default }
87         set { }
88     }
89 }
90
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? {
96         get { nil }
97         set { }
98     }
99     @available(*, unavailable, renamed: "toolbarConfiguration.previousBarButtonConfiguration.title",
100                 message: "To change, please assign a new toolbarConfiguration.previousBarButtonConfiguration")
101     @objc var toolbarPreviousBarButtonItemText: String? {
102         get { nil }
103         set { }
104     }
105     @available(*, unavailable, renamed: "toolbarConfiguration.previousBarButtonConfiguration.accessibilityLabel",
106                 message: "To change, please assign a new toolbarConfiguration.previousBarButtonConfiguration")
107     @objc var toolbarPreviousBarButtonItemAccessibilityLabel: String? {
108         get { nil }
109         set { }
110     }
111
112     @available(*, unavailable, renamed: "toolbarConfiguration.nextBarButtonConfiguration.image",
113                 message: "To change, please assign a new toolbarConfiguration.nextBarButtonConfiguration")
114     @objc var toolbarNextBarButtonItemImage: UIImage? {
115         get { nil }
116         set { }
117     }
118     @available(*, unavailable, renamed: "toolbarConfiguration.nextBarButtonConfiguration.title",
119                 message: "To change, please assign a new toolbarConfiguration.nextBarButtonConfiguration")
120     @objc var toolbarNextBarButtonItemText: String? {
121         get { nil }
122         set { }
123     }
124     @available(*, unavailable, renamed: "toolbarConfiguration.nextBarButtonConfiguration.accessibilityLabel",
125                 message: "To change, please assign a new toolbarConfiguration.nextBarButtonConfiguration")
126     @objc var toolbarNextBarButtonItemAccessibilityLabel: String? {
127         get { nil }
128         set { }
129     }
130
131     @available(*, unavailable, renamed: "toolbarConfiguration.doneBarButtonConfiguration.image",
132                 message: "To change, please assign a new toolbarConfiguration.doneBarButtonConfiguration")
133     @objc var toolbarDoneBarButtonItemImage: UIImage? {
134         get { nil }
135         set { }
136     }
137     @available(*, unavailable, renamed: "toolbarConfiguration.doneBarButtonConfiguration.title",
138                 message: "To change, please assign a new toolbarConfiguration.doneBarButtonConfiguration")
139     @objc var toolbarDoneBarButtonItemText: String? {
140         get { nil }
141         set { }
142     }
143     @available(*, unavailable, renamed: "toolbarConfiguration.doneBarButtonConfiguration.accessibilityLabel",
144                 message: "To change, please assign a new toolbarConfiguration.doneBarButtonConfiguration")
145     @objc var toolbarDoneBarButtonItemAccessibilityLabel: String? {
146         get { nil }
147         set { }
148     }
149 }
150
151 @available(iOSApplicationExtension, unavailable)
152 public extension IQKeyboardManager {
153
154     @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.accessibilityLabel")
155     @objc var toolbarTitlBarButtonItemAccessibilityLabel: String? {
156         get { nil }
157         set { }
158     }
159
160     @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.showPlaceholder")
161     @objc var shouldShowToolbarPlaceholder: Bool {
162         get { false }
163         set { }
164     }
165
166     @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.font")
167     @objc var placeholderFont: UIFont? {
168         get { nil }
169         set { }
170     }
171
172     @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.color")
173     @objc var placeholderColor: UIColor? {
174         get { nil }
175         set { }
176     }
177
178     @available(*, unavailable, renamed: "toolbarConfiguration.placeholderConfiguration.buttonColor")
179     @objc var placeholderButtonColor: UIColor? {
180         get { nil }
181         set { }
182     }
183 }
184
185 @available(iOSApplicationExtension, unavailable)
186 public extension IQKeyboardManager {
187
188     @available(*, unavailable, renamed: "keyboardConfiguration.overrideAppearance")
189     @objc var overrideKeyboardAppearance: Bool {
190         get { false }
191         set { }
192     }
193
194     @available(*, unavailable, renamed: "keyboardConfiguration.appearance")
195     @objc var keyboardAppearance: UIKeyboardAppearance {
196         get { .default }
197         set { }
198     }
199 }
200
201 @available(iOSApplicationExtension, unavailable)
202 public extension IQKeyboardManager {
203
204     typealias SizeBlock = (_ size: CGSize) -> Void
205
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) {}
208
209     @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
210     @objc func unregisterKeyboardSizeChange(identifier: AnyHashable) {}
211
212     @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
213     @objc var keyboardShowing: Bool { false }
214
215     @available(*, unavailable, message: "This feature has been moved to IQKeyboardListener, use it directly by creating new instance")
216     @objc var keyboardFrame: CGRect { .zero }
217 }
218 // swiftlint:enable unused_setter_value
219 // swiftlint:enable identifier_name
220 // swiftlint:enable line_length