2 // IQKeyboardManagerConstants.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 // MARK: IQAutoToolbarManageBehavior
29 `IQAutoToolbarBySubviews`
30 Creates Toolbar according to subview's hierarchy of Textfield's in view.
33 Creates Toolbar according to tag property of TextField's.
35 `IQAutoToolbarByPosition`
36 Creates Toolbar according to the y,x position of textField in it's superview coordinate.
38 @available(iOSApplicationExtension, unavailable)
39 @objc public enum IQAutoToolbarManageBehavior: Int {
46 `IQPreviousNextDisplayModeDefault`
47 Show NextPrevious when there are more than 1 textField otherwise hide.
49 `IQPreviousNextDisplayModeAlwaysHide`
50 Do not show NextPrevious buttons in any case.
52 `IQPreviousNextDisplayModeAlwaysShow`
53 Always show nextPrevious buttons,
54 if there are more than 1 textField then both buttons will be visible but will be shown as disabled.
56 @available(iOSApplicationExtension, unavailable)
57 @objc public enum IQPreviousNextDisplayMode: Int {
65 Pick default settings.
70 `IQEnableModeDisabled`
73 @available(iOSApplicationExtension, unavailable)
74 @objc public enum IQEnableMode: Int {
81 /---------------------------------------------------------------------------------------------------\
82 \---------------------------------------------------------------------------------------------------/
83 | iOS Notification Mechanism |
84 /---------------------------------------------------------------------------------------------------\
85 \---------------------------------------------------------------------------------------------------/
87 ------------------------------------------------------------
88 When UITextField become first responder
89 ------------------------------------------------------------
90 - UITextFieldTextDidBeginEditingNotification (UITextField)
91 - UIKeyboardWillShowNotification
92 - UIKeyboardDidShowNotification
94 ------------------------------------------------------------
95 When UITextView become first responder
96 ------------------------------------------------------------
97 - UIKeyboardWillShowNotification
98 - UITextViewTextDidBeginEditingNotification (UITextView)
99 - UIKeyboardDidShowNotification
101 ------------------------------------------------------------
102 When switching focus from UITextField to another UITextField
103 ------------------------------------------------------------
104 - UITextFieldTextDidEndEditingNotification (UITextField1)
105 - UITextFieldTextDidBeginEditingNotification (UITextField2)
106 - UIKeyboardWillShowNotification
107 - UIKeyboardDidShowNotification
109 ------------------------------------------------------------
110 When switching focus from UITextView to another UITextView
111 ------------------------------------------------------------
112 - UITextViewTextDidEndEditingNotification: (UITextView1)
113 - UIKeyboardWillShowNotification
114 - UITextViewTextDidBeginEditingNotification: (UITextView2)
115 - UIKeyboardDidShowNotification
117 ------------------------------------------------------------
118 When switching focus from UITextField to UITextView
119 ------------------------------------------------------------
120 - UITextFieldTextDidEndEditingNotification (UITextField)
121 - UIKeyboardWillShowNotification
122 - UITextViewTextDidBeginEditingNotification (UITextView)
123 - UIKeyboardDidShowNotification
125 ------------------------------------------------------------
126 When switching focus from UITextView to UITextField
127 ------------------------------------------------------------
128 - UITextViewTextDidEndEditingNotification (UITextView)
129 - UITextFieldTextDidBeginEditingNotification (UITextField)
130 - UIKeyboardWillShowNotification
131 - UIKeyboardDidShowNotification
133 ------------------------------------------------------------
134 When opening/closing UIKeyboard Predictive bar
135 ------------------------------------------------------------
136 - UIKeyboardWillShowNotification
137 - UIKeyboardDidShowNotification
139 ------------------------------------------------------------
140 On orientation change
141 ------------------------------------------------------------
142 - UIApplicationWillChangeStatusBarOrientationNotification
143 - UIKeyboardWillHideNotification
144 - UIKeyboardDidHideNotification
145 - UIApplicationDidChangeStatusBarOrientationNotification
146 - UIKeyboardWillShowNotification
147 - UIKeyboardDidShowNotification
148 - UIKeyboardWillShowNotification
149 - UIKeyboardDidShowNotification