iOS 27: Continuous Keyboard Flickering When Editing TextFields in the Last Table View Cells
Describe the bug
When a UITableViewController is embedded as a child of a UIViewController, the keyboard continuously flickers when editing a UITextField in the last few table view cells on iOS 27.
This issue occurs when IQKeyboardToolbarManager is enabled using the following configuration:
IQKeyboardToolbarManager.shared.isEnabled = true
Initially, tapping a text field in one of the last four cells opens the keyboard and works as expected. However, while the keyboard remains open, scrolling further down and tapping the text field in the last cell causes the keyboard and table view position to flicker continuously.
The issue is reproducible on iOS 27 and does not occur on earlier iOS versions.
The debug logs show repeated calls to adjustPosition() with alternating content inset values and upward/downward movements, which may be related to the issue.
To Reproduce
Steps to reproduce the behavior:
-
Create a
UIViewControllerthat contains aUITableViewControlleras a child view controller. -
Add multiple table view cells containing
UITextFieldinstances, ensuring that at least the last four cells contain text fields. -
Enable
IQKeyboardToolbarManagerusing the following configuration:IQKeyboardToolbarManager.shared.isEnabled = true -
Run the application on an iOS 27 simulator or device with IQKeyboardManagerSwift enabled.
-
Scroll to the bottom of the table view and tap a text field in one of the last four cells. Verify that the keyboard opens and works as expected.
-
Without dismissing the keyboard, scroll further down to the last cell and tap its text field.
-
Observe that the keyboard and table view position continuously flicker instead of remaining stable.
Expected behavior
The keyboard should open normally, and IQKeyboardManagerSwift should adjust the table view's content offset and insets correctly to keep the active text field visible.
Enabling IQKeyboardToolbarManager should not cause continuous keyboard flickering or repeated, conflicting adjustments to the table view's position.
Screenshots
The attached screenshot shows repeated adjustPosition() calls in the debug console with alternating content inset values:
- Old bottom content inset:
338.0 - New bottom content inset:
396.0
The logs also show repeated upward and downward adjustments.
Video recordings and debug logs:
- Video 1 – Keyboard flickering: https://drive.google.com/file/d/1LGtTDx8slaPJicfQpj5n773TTlqJXCkZ/view?usp=sharing
- Video 2 – Additional reproduction: https://drive.google.com/file/d/1PlnrWjFtiBl1VzgQj7r0Dn55zTr-evmH/view?usp=sharing
- Screenshot – Debug logs: https://drive.google.com/file/d/1zjsgGGrxr1jyDH2NsnzPDfttPW9d69_Y/view?usp=sharing
Versions
Xcode: Version 27.1
Mac OS: Version 27.0.1
Simulator/Device: iOS 27.0
Simulator/Device Name: iPhone 17
Library Version: IQKeyboardManagerSwift 8.0.3
Additional context
- The issue is reproducible on iOS 27.0.
- The same behavior does not occur on earlier iOS versions.
- The issue occurs when the
UITableViewControlleris embedded as a child of anotherUIViewController. - The issue occurs when
IQKeyboardToolbarManager.shared.isEnabled = true. - The problem appears when editing text fields near the bottom of the table view while the keyboard is already open.
- The debug logs show repeated
adjustPosition()executions and alternating content inset values while the keyboard is active.
Please investigate whether changes in iOS 27 keyboard or scroll view behavior are causing IQKeyboardManagerSwift to repeatedly adjust the table view's position and content insets when IQKeyboardToolbarManager is enabled.
Thanks for reporting this issue. I'll surely check this.
I am getting severe UI freezes when using UITextviews in a UITableView on ios 17 only. It happens under very specific conditions though:
- If I use the next button and the table has to scroll to the next input view = freezes. or
- If I tap on a text view that is barely peeking into the screen and it gets scrolled up so that it displays comfortably in the screen = freezes (also in a table view)
If you scroll to a field and make sure its in the middle of the screen, so that the view doesnt have to scroll when you tap on it, it works fine.
I wasnt smart enough to figure out a fix myself, But my AI did make the following changes as a work around for now:
- Disable IQKeyboard feature for the particular view: IQKeyboardManager.shared.disabledDistanceHandlingClasses.append
- In the affected view, detect when editing starts and scroll to the relevant view manually.
It also gave me a summary of the debug info, maybe it helps: " Debugger observations
Pausing during the freeze captured: IQKeyboardManager.adjustScrollViewContentInset(...) IQKeyboardManager.adjustScrollViewContentOffsets(...) IQKeyboardManager.adjustPosition() IQKeyboardManager.handleKeyboardTextInputViewChanged() IQActiveConfiguration.sendEvent() IQKeyboardNotification.sendKeyboardInfo(...)
Further down the same stack: UIKeyboardSceneDelegate._reloadInputViewsForKeyWindowSceneResponder(...) UIPeripheralHost queueDelayedTask:forKey:delay:
The queueDelayedTask:forKey:delay: frame repeats approximately 25 times in the captured stack. "
Hi, if you have an specific condition, then could you please share the demo project so that I can check it easily?
Hi! Create a TableViewCell with just a UITextField.
Then: class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var table: UITableView!
private var dataSource: UITableViewDiffableDataSource<Int, String>!
override func viewDidLoad() {
super.viewDidLoad()
table.estimatedRowHeight = 239
table.delegate = self
table.dataSource = self
table.register(TableViewCell.nib, forCellReuseIdentifier: TableViewCell.identifier)
}
// MARK: TableView functions
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 100
}
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let cell = table.dequeueReusableCell(withIdentifier: TableViewCell.identifier) as? TableViewCell {
return cell
} else {
return UITableViewCell()
}
}
}
Once the view opens, tap on a text field and use the keyboard next button repetitively until its supposed to select a textview below the keyboard (so that the view needs to scroll). It will freeze / drastically slow down. Note: this is for the UI freezing issue and not the keyboard flicker issue originally discussed. And it only happens on ios 27
i havent tested other versions, but if i revert my projects back to IQManager 6.5.11 it works as expected. Will test more next week