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() + } } }) }