Comments (3)
Test case added in a branch https://github.com/krin-san/Coordinator/tree/bugfix/pop_back_child reproduces this issue.
from coordinator.
This is nice catch. I'll look into this as soon as I have time.
from coordinator.
Thinking out-loud...it seems to me in all these cases where I just return
from the didShowController(_)
, I should actually call parent?.coordinatorDidFinish(self, completion: {})
guard let index = viewControllers.firstIndex(of: viewController) else {
parent?.coordinatorDidFinish(self, completion: {})
return
}
...
if lastIndex <= index {
parent?.coordinatorDidFinish(self, completion: {})
return
}
In the first case, shown VC is not in this Coordinator's domain, thus most likely this Coordinator is not active anymore. In the exit, it's the same thing.
Thus parent Coordinator should then figure out which Coordinator should be re-instated.
from coordinator.
Related Issues (20)
- Declarations from extensions cannot be overridden yet HOT 6
- Rewinding state after stop/stopChild HOT 4
- Track `popViewController` when user taps Back bar button on iOS >= 10 HOT 6
- Return back the UINavigationController delegate to parent coordinator when share the UINavigationController HOT 2
- Support Carthage HOT 8
- Support Swift Package manager HOT 2
- Add shields.io badges
- Non-animated pop is not detected in NavigationCoordinator HOT 5
- Bloated Namespace HOT 1
- Unable to compile CoordinatorExample.xcodeproj HOT 2
- [Refactor] :Make code clean HOT 6
- How to compile and run the example app? HOT 1
- Cocoapods error HOT 2
- Tutorial request - A sample xcproject? HOT 1
- Crash on Accessing Parent Coordinator HOT 3
- Can't use Struct as params in UIResponder's method HOT 1
- Bubbling events in the responder chain HOT 4
- Track Dismissal of RootViewController HOT 3
- UITabBarController as Root or Child Coordinator HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coordinator.