Ios 设置hidesBarsOnSwipe=YES有时会使应用程序崩溃(uvSendEvents)

Ios 设置hidesBarsOnSwipe=YES有时会使应用程序崩溃(uvSendEvents),ios,objective-c,uiscrollview,uinavigationcontroller,Ios,Objective C,Uiscrollview,Uinavigationcontroller,如果用户反复上下滚动,设置hidesBarsOnSwipe=YES有时会使我的应用程序崩溃。我有Crashlytics的报告,但无法始终如一地复制 Fatal Exception: NSInternalInconsistencyException Trying to finish an interactive transition that was not started interactively Thread : Fatal Exception: NSInternalInconsistenc

如果用户反复上下滚动,设置hidesBarsOnSwipe=YES有时会使我的应用程序崩溃。我有Crashlytics的报告,但无法始终如一地复制

Fatal Exception: NSInternalInconsistencyException
Trying to finish an interactive transition that was not started interactively
Thread : Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x0000000182154f5c    __exceptionPreprocess
1  libobjc.A.dylib                0x0000000196c5bf80 objc_exception_throw
2  CoreFoundation                 0x0000000182154e2c +[NSException raise:format:]
3  Foundation                     0x0000000183043f3c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4  UIKit                          0x0000000187f237fc -[_UIAnimationCoordinator finishInteractiveAnimation]
5  UIKit                          0x0000000187a38980 -[UINavigationController _gestureRecognizedInteractiveHide:]
6  UIKit                          0x0000000187c03b0c _UIGestureRecognizerSendTargetActions
7_UIGestureRecognizerSendActions
8  UIKit                          0x00000001876dd690 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
9  UIKit                          0x0000000187c04e5c ___UIGestureRecognizerUpdate_block_invoke809
10 UIKit                          0x000000018769d0fc _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks
11 UIKit                          0x000000018769b1d0 _UIGestureRecognizerUpdate
12 UIKit                          0x00000001876db548 -[UIWindow _sendGesturesForEvent:]
13 UIKit                          0x00000001876daaac -[UIWindow sendEvent:]
14 UIKit                          0x00000001876aba10 -[UIApplication sendEvent:]
15 MyAppName                     0x0000000100486d78 uvSendEvents
16 UIKit                          0x00000001876a9efc _UIApplicationHandleEventQueue
17 CoreFoundation                 0x000000018210c5a4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
18 CoreFoundation                 0x000000018210c038 __CFRunLoopDoSources0
19 CoreFoundation                 0x0000000182109d38 __CFRunLoopRun
20 CoreFoundation                 0x0000000182038dc0 CFRunLoopRunSpecific
21 GraphicsServices               0x000000018d18c088 GSEventRunModal
22 UIKit                          0x0000000187712f44 UIApplicationMain
23 MyAppName                     0x00000001000ea740 main (main.m:32)
24 libdyld.dylib                  0x00000001974868b8 start
我在openradar中发现了相同的错误报告,但找不到解决方案。


请帮助

您有自定义导航栏吗?我也有同样的问题,按照苹果示例中使用的定制模式为我解决了这个问题(我怀疑是它实现了LayoutSubView并清理了视图层次结构)。我做错的是我保留了导航控制器的财产-

self.navigationController?.hidesBarsOnSwipe = true
Plus

我在滚动上手动管理导航控制器隐藏/取消隐藏


因此,这两个转换同时被覆盖

我也有这个问题,但我没有使用自定义导航栏。你有没有找到解决这个问题的方法?那么解决方法是什么?