Showing black space between UIKeyboard and View due to Sliding up Keyboard above View position.
hackiftekhar opened this issue · 15 comments
Added preventShowingBottomBlankSpace
bool to not show bottom blank space between UIkeyboard and View. preventShowingBottomBlankSpace
default to YES
.
Seems it doesn't work on iOS 9.3. Whatever I set the property to false or true, it wont work.
Could you please share an screenshot of issue you are getting?
@hackiftekhar , thanks for response quickly , please check the attached. You can see the black bar at the bottom.
The code used:IQKeyboardManager.sharedManager().preventShowingBottomBlankSpace = true
Hmm, looks like you set keyboardDistanceFromTextField
to something about 100-200, but still this shouldn't happen.
No, I didn't touch keyboardDistanceFromTextField
property.
I used a ScrollView there to make it scrollable to select fields.
Are you sure your scrollView is calculating correct contentSize?
Actually I didn't touch contentSize, I do auto layout config all on Storyboard. It displays fine when keyboard isn't showing. Weird!!!
Then could you please share a demo project?
IQKeyboardManager.sharedManager().canAdjustAdditionalSafeAreaInsets = true
Adding this to appdelegate resolved my problem.
Adding
viewdidappear
textField.becomeFirstResponder()
and
@objc func keyboardWillAppear() {
//Do something here
self.payTextView.frame.origin.y += self.view.safeAreaInsets.bottom
}
@objc func keyboardWillDisappear() {
//Do something here
self.payTextView.frame.origin.y -= self.view.safeAreaInsets.bottom
}
fixed my issue.