You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@abstract Adjust textView's contentInset to fix fix for iOS 7.0.x - http://stackoverflow.com/questions/18966675/uitextview-in-ios7-clips-the-last-line-of-text-string Default is YES.
Copy file name to clipboardexpand all lines: KeyboardTextFieldDemo/IQKeyboardManager.xcodeproj/xcuserdata/iftekhar.xcuserdatad/xcschemes/IQKeyboard.xcscheme
Copy file name to clipboardexpand all lines: README.md
+64-27
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Often while developing an app, We ran into an issues where the iPhone `UIKeyboar
7
7
8
8
####Key Features
9
9
10
-
1)`CODELESS, Zero Line Of Code`
10
+
1)**CODELESS**, Zero Line Of Code`
11
11
12
12
2)`Works Automatically`
13
13
@@ -75,20 +75,27 @@ If you need to port your project to another location you may need to adjust `Fra
75
75
76
76
#### Source Code Method:-
77
77
78
-
Just drag and drop `IQKeyBoardManager` directory from demo project to your project. That's it. No need to write any single line of code. It will enable automatically.
78
+
Just ***drag and drop***`IQKeyBoardManager` directory from demo project to your project. That's it.
1)**Keyboard does not appear in iOS Simulator** ([#62](https://github.com/hackiftekhar/IQKeyboardManager/issues/62), [#72](https://github.com/hackiftekhar/IQKeyboardManager/issues/72), [#75](https://github.com/hackiftekhar/IQKeyboardManager/issues/75), [#90](https://github.com/hackiftekhar/IQKeyboardManager/issues/90), [#100](https://github.com/hackiftekhar/IQKeyboardManager/issues/100))
84
+
**1) Keyboard does not appear in iOS Simulator** ([#62](https://github.com/hackiftekhar/IQKeyboardManager/issues/62), [#72](https://github.com/hackiftekhar/IQKeyboardManager/issues/72), [#75](https://github.com/hackiftekhar/IQKeyboardManager/issues/75), [#90](https://github.com/hackiftekhar/IQKeyboardManager/issues/90), [#100](https://github.com/hackiftekhar/IQKeyboardManager/issues/100))
85
85
86
86
If keyboard does not appear in iOS Simulator and only toolbar is appearing over it (if enableAutoToolbar = YES), then check this setting
87
87
88
-
**Xcode 6:-** Goto ***iOS Simulator->Menu->Hardware->Keyboard->Connect Hardware Keyboard***, and deselect that.
88
+
***Xcode 6:-*** Goto ***iOS Simulator->Menu->Hardware->Keyboard->Connect Hardware Keyboard***, and deselect that.
89
89
90
-
**Xcode 5 and earlier:-** Goto ***iOS Simulator->Menu->Hardware->Simulate Hardware Keyboard***, and deselect that.
90
+
***Xcode 5 and earlier:-*** Goto ***iOS Simulator->Menu->Hardware->Simulate Hardware Keyboard***, and deselect that.
If you set ***[[IQKeyboardManager sharedManager] setEnable:NO]*** and still automatic toolbar appears on textFields? Probably you haven't heard about ***@property enableAutoToolbar***.
95
+
96
+
***@property enable :*** It enable/disable managing distance between keyboard and textField, and doesn't affect autoToolbar feature.
97
+
98
+
***@property enableAutoToolbar :*** It enable/disable automatic creation of toolbar, please set enableAutoToolbar to NO if you don't want to add automatic toolbar.
92
99
93
100
Manual Management:-
94
101
---
@@ -135,7 +142,7 @@ Manual Management:-
135
142
136
143
137
144
#### Keyboard Return Key Handling:-
138
-
If you would like to implement keyboard `Return Key` as `Next` button, then you can use `IQKeyboardReturnKeyHandler`.([#38](https://github.com/hackiftekhar/IQKeyboardManager/issues/38), [#63](https://github.com/hackiftekhar/IQKeyboardManager/issues/63))
145
+
If you would like to implement keyboard **Return Key** as **Next/Done** button, then you can use **IQKeyboardReturnKeyHandler**.([#38](https://github.com/hackiftekhar/IQKeyboardManager/issues/38), [#63](https://github.com/hackiftekhar/IQKeyboardManager/issues/63))
139
146
140
147
1) Create an instance variable of `IQKeyboardReturnKeyHandler` and instantiate it in `viewDidLoad` with ViewController object like this:-
#### Doing custom work on textField with returning NO in `textFieldShouldBeginEditing:` delegate:-
217
224
218
-
Generally if developer need to perform some custom task on a particular textField click, then usually developer write their custom code inside `textFieldShouldBeginEditing:` and returning NO for that textField. But if you are using IQKeyboardManager, then IQKeyboardManager also asks textField to recognize it can become first responder or not using `canBecomeFirstResponder` in `IQUIView+Hierarchy` category, and textField asks it's delegate to respond from `textFieldShouldBeginEditing:`, so this method is called for each textField everytime when a textField becomeFirstResponder. Unintentionally custom code runs multiple times even when we do not touch the textField to become it as first responder. To overcome this situation please use `isAskingCanBecomeFirstResponder` BOOL property to check that the delegate is called by IQKeyboardManager or not. ([#88](https://github.com/hackiftekhar/IQKeyboardManager/issues/88))
225
+
Generally if developer need to perform some custom task on a particular textField click, then usually developer write their custom code inside ***textFieldShouldBeginEditing:*** and returning NO for that textField. But if you are using IQKeyboardManager, then IQKeyboardManager also asks textField to recognize it can become first responder or not using ***canBecomeFirstResponder*** in `IQUIView+Hierarchy` category, and textField asks it's delegate to respond from `textFieldShouldBeginEditing:`, so this method is called for each textField everytime when a textField becomeFirstResponder. Unintentionally custom code runs multiple times even when we do not touch the textField to become it as first responder. To overcome this situation please use ***isAskingCanBecomeFirstResponder*** BOOL property to check that the delegate is called by IQKeyboardManager or not. ([#88](https://github.com/hackiftekhar/IQKeyboardManager/issues/88))
219
226
220
227
1) You may need to import `IQUIView+Hierarchy` category
221
228
```
222
229
#import "IQUIView+Hierarchy.h"
223
230
```
224
231
225
-
2) check for `isAskingCanBecomeFirstResponder` in `textFieldShouldBeginEditing:` delegate.
232
+
2) check for ***isAskingCanBecomeFirstResponder*** in `textFieldShouldBeginEditing:` delegate.
Prevent to show bottom blanck area when keyboard slide up the view. ([#93](https://github.com/hackiftekhar/IQKeyboardManager/issues/93)). Default is YES.
272
+
273
+
**IQToolbar handling**
274
+
---
275
+
276
+
**5) @property BOOL enableAutoToolbar :**
260
277
Enable autoToolbar behaviour. If It is set to NO. You have to manually create UIToolbar for keyboard. Default is YES.
Setting toolbar behaviour to IQAutoToolbarBySubviews to manage previous/next according to UITextField's hierarchy in it's SuperView. Set it to IQAutoToolbarByTag to manage previous/next according to UITextField's tag property in increasing order. Default is IQAutoToolbarBySubviews.
If YES, then uses textField's tintColor property for IQToolbar, otherwise tintColor is black. Default is NO. ([#27](https://github.com/hackiftekhar/IQKeyboardManager/issues/27))
If YES, then it add the textField's placeholder text on IQToolbar. Default is YES. ([#27](https://github.com/hackiftekhar/IQKeyboardManager/issues/27))
270
287
271
-
8) `placeholderFont`
288
+
**9) @property UIFont \*placeholderFont :**
272
289
placeholder Font. Default is nil. ([#27](https://github.com/hackiftekhar/IQKeyboardManager/issues/27))
273
290
274
-
9) `canAdjustTextView`
291
+
292
+
**UITextView handling**
293
+
---
294
+
295
+
**10) @property BOOL canAdjustTextView :**
275
296
Giving permission to modify TextView's frame. Adjust textView's frame when it is too big in height. Default is NO. ([#30](https://github.com/hackiftekhar/IQKeyboardManager/issues/30))
276
297
277
-
10) `overrideKeyboardAppearance`
298
+
**11) @property BOOL shouldFixTextViewClip :**
299
+
Adjust textView's contentInset to fix fix for iOS 7.0.x -([#Stackoverflow](http://stackoverflow.com/questions/18966675/uitextview-in-ios7-clips-the-last-line-of-text-string)). Default is YES.
Resign textField if touched outside of UITextField/UITextView. ([#14](https://github.com/hackiftekhar/IQKeyboardManager/issues/14))
285
317
286
-
13) `-resignFirstResponder`
318
+
**15) -(void)resignFirstResponder :**
287
319
Resigns currently first responder field.
288
320
289
-
14) `shouldPlayInputClicks`
321
+
322
+
**UISound handling**
323
+
---
324
+
325
+
**16) @property BOOL shouldPlayInputClicks :**
290
326
If YES, then it plays inputClick sound on next/previous/done click. Default is NO.
291
327
292
-
15) `shouldAdoptDefaultKeyboardAnimation`
293
-
If YES, then uses keyboard default animation curve style to move view, otherwise uses UIViewAnimationOptionCurveEaseOut animation style. Default is YES.
294
328
295
-
16) `preventShowingBottomBlankSpace`
296
-
Prevent to show bottom black area when keyboard slide up the view. ([#93](https://github.com/hackiftekhar/IQKeyboardManager/issues/93))
If YES, then uses keyboard default animation curve style to move view, otherwise uses UIViewAnimationOptionCurveEaseOut animation style. Default is YES.
0 commit comments