ekazaev / route-composer

Protocol oriented, Cocoa UI abstractions based library that helps to handle view controllers composition, navigation and deep linking tasks in the iOS application. Can be used as the universal replacement for the Coordinator pattern.
MIT License
896 stars 63 forks source link

Use UIViewController's transitionCoordinator for animated completion block #62

Closed Elaz-viz closed 3 years ago

Elaz-viz commented 3 years ago

NavigationControllerAdapter is using CATransaction for registering a completion block in navigation events that are animated. Apparently (and in live tests) - the completion block isn't always called when using this method, see also this stack overflow discussion.

Using the transition coordinator in this specific case is more reliable (no missed completion blocks in animated transitions), and according to Apple documentation, a transition coordinator will always be available during the a transition.

codecov[bot] commented 3 years ago

Codecov Report

Merging #62 (c73e408) into master (91dc0e7) will decrease coverage by 0.11%. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   95.53%   95.42%   -0.12%     
==========================================
  Files         108      108              
  Lines        2016     2010       -6     
==========================================
- Hits         1926     1918       -8     
- Misses         90       92       +2     
Impacted Files Coverage Δ
...Classes/Adapters/NavigationControllerAdapter.swift 93.75% <83.33%> (-6.25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 91dc0e7...c73e408. Read the comment docs.

ekazaev commented 3 years ago

Great. I was thinking to replace it. But decided not to touch as it worked for. My scenarios.