Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to solve "Failed to determine navigation direction for scroll" bug
    text
    copied!<p>My most frequent bug has "Failed to determine navigation direction for scroll" for reason, any idea about how I could solve it?</p> <p>Here is the last Exception Backtrace:</p> <pre><code> 1. CoreFoundation __exceptionPreprocess + 131 2. libobjc.A.dylib _objc_exception_throw + 39 3. CoreFoundation +[NSException raise:format:] + 1 4. Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91 5. UIKit __54-[_UIQueuingScrollView _didScrollWithAnimation:force:]_block_invoke + 221 6. UIKit -[_UIQueuingScrollView _didScrollWithAnimation:force:] + 567 7. UIKit -[_UIQueuingScrollView _scrollViewAnimationEnded:finished:] + 73 8. UIKit -[UIAnimator stopAnimation:] + 471 9. UIKit -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 285 10. UIKit -[UIAnimator(Static) _LCDHeartbeatCallback:] + 53 11. QuartzCore CA::Display::DisplayLinkItem::dispatch() + 99 12. QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 345 13. IOMobileFramebuffer IOMobileFramebufferVsyncNotifyFunc + 105 14. IOKit _IODispatchCalloutFromCFMessage + 249 15. CoreFoundation __CFMachPortPerform + 137 16. CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35 17. CoreFoundation __CFRunLoopDoSource1 + 347 18. CoreFoundation __CFRunLoopRun + 1399 19. CoreFoundation _CFRunLoopRunSpecific + 523 20. CoreFoundation _CFRunLoopRunInMode + 107 21. GraphicsServices _GSEventRunModal + 139 22. UIKit _UIApplicationMain + 1137 23. MyApp main (main.m:13) </code></pre> <p><strong>UPDATE :</strong> I finally managed to reproduce the bug on the simulator, it's when I'am touching a view and that at the same time, the UIPageViewController scroll animation starts programmatically. Basically, if you setViewsControllers programmatically with animation set to yes and scroll animation. If you're touching any part of the screen before the scroll animation starts there will be the following crash *** Assertion failure in -[_UIQueuingScrollView _didScrollWithAnimation:force:], /SourceCache/UIKit/UIKit-2372/_UIQueuingScrollView.m:778 as described <a href="https://stackoverflow.com/questions/12916422/assertion-failure-in-uiqueuingscrollview-didscrollwithanimationforce">here</a> . </p> <p>I also downloaded Apple's PhotoScroller sample app and edited it with programmatic page change and they have the same bug. </p> <p>My solution was not to trigger the page change if the user is currently touching the screen, you can also change the animation to curl or remove the animation.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload