a3aac5c68de2cc9dd9d7671cc6539afefaeb96fc
[mirrors/VoiceChatSdk_iOS.git] /
1 //
2 //  IQKeyboardManagerConstants.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 Foundation
25
26 // MARK: IQAutoToolbarManageBehavior
27
28 /**
29 `IQAutoToolbarBySubviews`
30 Creates Toolbar according to subview's hierarchy of Textfield's in view.
31
32 `IQAutoToolbarByTag`
33 Creates Toolbar according to tag property of TextField's.
34
35 `IQAutoToolbarByPosition`
36 Creates Toolbar according to the y,x position of textField in it's superview coordinate.
37 */
38 @available(iOSApplicationExtension, unavailable)
39 @objc public enum IQAutoToolbarManageBehavior: Int {
40     case bySubviews
41     case byTag
42     case byPosition
43 }
44
45 /**
46  `IQPreviousNextDisplayModeDefault`
47  Show NextPrevious when there are more than 1 textField otherwise hide.
48  
49  `IQPreviousNextDisplayModeAlwaysHide`
50  Do not show NextPrevious buttons in any case.
51  
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.
55  */
56 @available(iOSApplicationExtension, unavailable)
57 @objc public enum IQPreviousNextDisplayMode: Int {
58     case `default`
59     case alwaysHide
60     case alwaysShow
61 }
62
63 /**
64  `IQEnableModeDefault`
65  Pick default settings.
66  
67  `IQEnableModeEnabled`
68  setting is enabled.
69  
70  `IQEnableModeDisabled`
71  setting is disabled.
72  */
73 @available(iOSApplicationExtension, unavailable)
74 @objc public enum IQEnableMode: Int {
75     case `default`
76     case enabled
77     case disabled
78 }
79
80 /*
81  /---------------------------------------------------------------------------------------------------\
82  \---------------------------------------------------------------------------------------------------/
83  |                                   iOS Notification Mechanism                                    |
84  /---------------------------------------------------------------------------------------------------\
85  \---------------------------------------------------------------------------------------------------/
86  
87  ------------------------------------------------------------
88  When UITextField become first responder
89  ------------------------------------------------------------
90  - UITextFieldTextDidBeginEditingNotification (UITextField)
91  - UIKeyboardWillShowNotification
92  - UIKeyboardDidShowNotification
93  
94  ------------------------------------------------------------
95  When UITextView become first responder
96  ------------------------------------------------------------
97  - UIKeyboardWillShowNotification
98  - UITextViewTextDidBeginEditingNotification (UITextView)
99  - UIKeyboardDidShowNotification
100  
101  ------------------------------------------------------------
102  When switching focus from UITextField to another UITextField
103  ------------------------------------------------------------
104  - UITextFieldTextDidEndEditingNotification (UITextField1)
105  - UITextFieldTextDidBeginEditingNotification (UITextField2)
106  - UIKeyboardWillShowNotification
107  - UIKeyboardDidShowNotification
108  
109  ------------------------------------------------------------
110  When switching focus from UITextView to another UITextView
111  ------------------------------------------------------------
112  - UITextViewTextDidEndEditingNotification: (UITextView1)
113  - UIKeyboardWillShowNotification
114  - UITextViewTextDidBeginEditingNotification: (UITextView2)
115  - UIKeyboardDidShowNotification
116  
117  ------------------------------------------------------------
118  When switching focus from UITextField to UITextView
119  ------------------------------------------------------------
120  - UITextFieldTextDidEndEditingNotification (UITextField)
121  - UIKeyboardWillShowNotification
122  - UITextViewTextDidBeginEditingNotification (UITextView)
123  - UIKeyboardDidShowNotification
124  
125  ------------------------------------------------------------
126  When switching focus from UITextView to UITextField
127  ------------------------------------------------------------
128  - UITextViewTextDidEndEditingNotification (UITextView)
129  - UITextFieldTextDidBeginEditingNotification (UITextField)
130  - UIKeyboardWillShowNotification
131  - UIKeyboardDidShowNotification
132  
133  ------------------------------------------------------------
134  When opening/closing UIKeyboard Predictive bar
135  ------------------------------------------------------------
136  - UIKeyboardWillShowNotification
137  - UIKeyboardDidShowNotification
138  
139  ------------------------------------------------------------
140  On orientation change
141  ------------------------------------------------------------
142  - UIApplicationWillChangeStatusBarOrientationNotification
143  - UIKeyboardWillHideNotification
144  - UIKeyboardDidHideNotification
145  - UIApplicationDidChangeStatusBarOrientationNotification
146  - UIKeyboardWillShowNotification
147  - UIKeyboardDidShowNotification
148  - UIKeyboardWillShowNotification
149  - UIKeyboardDidShowNotification
150  
151  */