Giter VIP home page Giter VIP logo

xcoordinator-example's People

Contributors

pauljohanneskraft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xcoordinator-example's Issues

Split View Controller Example

Hi Guys, I was wondering if someone could help. I am trying to implement a SplitViewController similar to how the settings app on the iPad works. Do you guys have an example of that? The example you have inside the repo has a split view which has independent navigation controllers which don't effect each other.

Thanks in Advance

Navigation bug

Fast login/logout taps cause a strange behaviour: sometimes a tabbar is invisible, sometimes I land directly to Recents page, sometimes to More page.

iOS 13.

Please test how it works.

Passing Data With XCoordinator

Hi all,

Thanks for the MVC example and the sliders.

I want to create model at first in AppCoordinator and don't want to get instance whole project. I don't know if this is the best way but I need my updated model in all the view controllers. This can any data by the way, I want to pass data using XCoordinator.

My code is like below, router is assigning, but model is still nil in VC? Why?

`class AppCoordinator {
var root: Presentable?
private var person: Person

init() {
    self.person = Person()
}

func start(in window: UIWindow) {
    root = {
        if MyUserDefaults.firstLaunch { //Uygulamaya ilk kez giriş yapılmışsa
            return GuideCoordinator(model: person)
        } else if FirestoreHandler.authUID == nil { //Daha önce giriş yapılmış ancak user authenticated değilse
            return AuthCoordinator(model: person)
        } else { //Daha önce giriş yapılmışsa ve kullanıcı authenticated ise
            return AuthCoordinator(model: person) //TODO: MainCoordinator()
        }
    }()
    root?.setRoot(for: window)
}

}

class AuthCoordinator: NavigationCoordinator {
private let disposeBag = DisposeBag()
private var person: Person

// MARK: Initialization
init(model: Person) {
    self.person = model
    super.init(initialRoute: .signInOrSignUp)
}

// MARK: Overrides
override func prepareTransition(for route: AuthRoute) -> NavigationTransition {
    switch route {
    case .signInOrSignUp:
        let vc = LoginRegisterViewController.instantiate()
        vc.router = unownedRouter
        vc.model = person
        vc.hideNavigationBar()
        return .push(vc)
    }
}

}`

Thanks!

Crash in example app

I tried to run example app and got a crash
XCoordinator-Example(15255,0x10ac88dc0) malloc: recording malloc and VM allocation stacks using lite mode

there is an rx issue I guess, the call stack is

image

memory leak with addChild()

there is a memory leak with AboutCoordinator - it is added as a child into UserListCoordinator

@pauljohanneskraft we discussed this with you in slack and you adviced to removeChild or override viewController for fix cycle.

but I see a little problem, if we have a lot of coordinations in a child coordinator, override a viewController is not a good solution I guess.

removeChild decision isn't simple - we should notify coordinator from view (viewController) about we should free coordinator (if user tapped to back button) and handle some transitions which throw out from its coordinator. and then we should remove parent when transitions has been success.

the both solutions are far from perfect, right?

I have a proposal, what do you think about CoordinatorAutoreleasable protocol with some method which takes some view controller notifies a main controller of this flow - like root controller, just not root. Ideally, of course, it will be perfect if we will be able to inherit some coordinator from this protocol and it will be deallocated automatically :)

PageCoordinator?

I am confused on how PageCoordinator works in this example. When the HomePageCoordinator is shown it just shows the 3 buttons (logout, users about). Is there supposed to be a swipeable page controller?

I am looking to adopt XCoordinator in my app, but I cannot understand how to use a simple PageCoordinator for an onboarding flow. [Screen1, Screen2, Login Screen] as the pages. Any guidance would be great!

Thank you! :)

Example for Combine

Is it planned to make the example using Combine instead of RxSwift?

Man it sounds like I‘m an opponent of RxSwift xD

Input Not Trigger

Hi @pauljohanneskraft ,

Sorry for disturbing again. But I need help to learn best way to handle inputs.

I am using viewmodel and viewmodelImplementation like this XCoordinator example. But just button trigger example exists. What if the input is textfield or sth else and no need to trigger any action?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.