From dde7246f36c849792fc1f11d7cefcb1cc73f0c95 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Sep 2025 09:33:55 +0000 Subject: [PATCH 1/2] Initial plan From e813624ae58596b08ba5a08211305de97e1da38d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Sep 2025 09:42:01 +0000 Subject: [PATCH 2/2] Fix toolbar flashing during navigation back by checking interactive gesture state Co-authored-by: hackiftekhar <3831495+hackiftekhar@users.noreply.github.com> --- IQKeyboardManager/IQKeyboardManager.m | 7 ++++++- .../IQKeyboardManager/IQKeyboardManager+Position.swift | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/IQKeyboardManager/IQKeyboardManager.m b/IQKeyboardManager/IQKeyboardManager.m index 72325eab..889430d6 100644 --- a/IQKeyboardManager/IQKeyboardManager.m +++ b/IQKeyboardManager/IQKeyboardManager.m @@ -1097,7 +1097,12 @@ -(void)adjustPosition if ([strongSelf privateIsEnableAutoToolbar] == YES) { //This will update the next/previous states - [strongSelf addToolbarIfRequired]; + // Skip adding toolbar during interactive navigation gesture to prevent toolbar flash (Issue #2102) + BOOL isInteractiveGestureActive = (strongSelf->_rootViewController.navigationController.interactivePopGestureRecognizer.state == UIGestureRecognizerStateBegan || + strongSelf->_rootViewController.navigationController.interactivePopGestureRecognizer.state == UIGestureRecognizerStateChanged); + if (!isInteractiveGestureActive) { + [strongSelf addToolbarIfRequired]; + } } } }]; diff --git a/IQKeyboardManagerSwift/IQKeyboardManager/IQKeyboardManager+Position.swift b/IQKeyboardManagerSwift/IQKeyboardManager/IQKeyboardManager+Position.swift index 478aa439..17d96045 100644 --- a/IQKeyboardManagerSwift/IQKeyboardManager/IQKeyboardManager+Position.swift +++ b/IQKeyboardManagerSwift/IQKeyboardManager/IQKeyboardManager+Position.swift @@ -594,7 +594,10 @@ private extension IQKeyboardManager { if scrollView is UITableView || scrollView is UICollectionView { // This will update the next/previous states - textInputView.reloadInputViews() + // Skip reloading input views during interactive navigation gesture to prevent toolbar flash (Issue #2102) + if !activeConfiguration.rootControllerConfiguration.isInteractiveGestureActive { + textInputView.reloadInputViews() + } } }) }