Closed hyun99999 closed 11 months ago
It might be. Can you please share the code which needs to be added before presentation to reproduce this issue?
Sure why not! Use next code to present bottom sheet that has medium detent.
// ViewController has UITextField.
let sheet = ViewController()
if let sheet = sheet.sheetPresentationController {
// set detents
sheet.detents = [.medium()]
}
present(sheet, animated: true)
Next, touch UITextField to raise keyboard. boom, you can meet that it happend.
Thanks, I'll take a look at it.
@hyun99999 This might be because you are writing becomeFirstResponder() in viewWillAppear. When this function is called the view is not added to the window hierarchy.
I would suggest to move becomeFirstResponder(0 to viewDidAppear() because the view is properly configured and appeared in the UI.
@hackiftekhar And i was checked don't use becomFirstResponder()
, just touch text field.
The same situation was happend.
Like this.
It seems that the problem occurs when I use UISheetPresentationController
.
I'm unable to reproduce this issue like yours. It looks to be working perfectly fine for me. I need a demo project to debug it.
Once you attach a demo, please reopen the issue.
Describe the bug When present
UIViewController
that hassheetPresentationController
property. A keyboard raised UI components more that i expected. I use keyboardbecomeFirstResponder()
inviewWillAppear()
. In IQKeyboardManager6.5.15
normally works, but in6.5.16
it doesn't works.UISheetPresentationController
supports automatic keyboard avoidance. Wouldn't it have been a conflict because it played the same role twice?To Reproduce
just present UIViewController that has
sheetPresentationController
property.Expected behavior
Screenshots
Versions
Xcode: Version 15.0.1 (15A507) Mac OS: 14.1 Simulator/Device: 17.0 Simulator/Device Name: iPhone 15 Library Version: 6.5.16