GithubHelp home page GithubHelp logo

mixi-sb / rxcontroller Goto Github PK

View Code? Open in Web Editor NEW
2.0 9.0 0.0 501 KB

A library for developing iOS app with MVVM-C based on RxFlow and RxSwift.

Home Page: https://cocoapods.org/pods/RxController

License: MIT License

Ruby 2.04% Swift 97.81% Shell 0.15%
mvvm mvvm-c mvvm-ios rxswift rxcocoa rxflow

rxcontroller's People

Contributors

hiromisakurai avatar kazuki-horie-m avatar lm2343635 avatar musharebot avatar trad55 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rxcontroller's Issues

Search subclasses of RxViewController and Flow.

To scan all flows and all view controllers with view model, the class name of the subclasses of RxController and Flow should be searched at first.

RxViewController -> BaseViewController -> ???ViewController

Standard inputs and outputs for view model

The inputs/outputs model helps to make the data exchanging more standard.
https://github.com/kickstarter/native-docs/blob/master/inputs-outputs.md

Swift

Inputs

All input variables MutableProperty types that are invoked directly when needed from the view. The input setter function will set its appropriate member variable with the appropriate input parameter.

fileprivate let projectTappedProperty = MutableProperty<Project?>(nil)
public func projectTapped(_ project: Project) {
    self.projectTappedProperty.value = project
}

Note that the input variable is named with a Property suffix to clarify that it is a MutableProperty. Its function is the name of the action.

If an input value is void, use the following syntax:

fileprivate let viewDidLoadProperty = MutableProperty()
public func viewDidLoad() {
    self.viewDidLoadProperty.value = ()
}

Outputs

All output variables are Signal types with NoError as the second error parameter.

public let goToDiscovery: Signal<DiscoveryParams, NoError>

Note that Xcode will display an error on your output until it is instantiated in the view model's init(). You may set the output to .empty if you wish to continue without implementing, i.e. for testing purposes.

public let goToDiscovery: Signal<DiscoveryParams, NoError> = .empty

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.