GithubHelp home page GithubHelp logo

isabella232 / rxswiftutilities Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rxswiftcommunity/rxswiftutilities

0.0 0.0 0.0 92 KB

Helpful classes and extensions for RxSwift

License: MIT License

Ruby 4.61% Objective-C 2.40% Swift 92.99%

rxswiftutilities's Introduction

RxSwiftUtilities

CocoaPods Compatible Carthage Compatible Platform CI codecov

About

Helpful classes and extensions for RxSwift which don't belong in RxSwift core.

Usage

Check out the Documentation, the examples below, or the Example App.

ActivityIndicator

let signingIn = ActivityIndicator()

let signedIn = loginButtonTap.withLatestFrom(usernameAndPassword)
    .flatMapLatest { (username, password) in
        return API.signup(username, password: password)
            .trackActivity(signingIn)
    }
}

signingIn.asDriver()
    .drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible)
    .disposed(by: disposeBag)

Two-way binding

(textField.rx.text <-> variable)
    .disposed(by: disposeBag)

Example App

This repo contains an Example App with interactive examples.

To use the Example App:

cd ExampleApp
pod install

Open the project located in ExampleApp/ with Xcode and build/run it.

Requirements

  • Xcode 11
  • Swift 5

Installation

CocoaPods

Tested with pod --version: 1.1.1

In your Podfile:

use_frameworks!

target "YOUR_TARGET_NAME" do
  pod "RxSwiftUtilities"
end

Replace YOUR_TARGET_NAME and then, in the same directory, run:

pod install

Swift Package Manager

Tested with xcode version: 11.5

Add the dependency with xcode via Files>Swift Packages>Add Package Dependency...

Or

Create a Package.swift file.

// swift-tools-version:5.1

import PackageDescription

let package = Package(
  name: "RxSwiftUtiliesTestProject",
  dependencies: [
    .package(url: "https://github.com/RxSwiftCommunity/RxSwiftUtilities", from: "5.0.0")
  ],
  targets: [
    .target(name: "RxSwiftUtiliesTestProject", dependencies: ["RxSwiftUtilities"])
  ]
)
$ swift build

Carthage

Tested with carthage version: 0.18

Add this to Cartfile

github "RxSwiftCommunity/RxSwiftUtilities"

In the same directory, run:

carthage update

Link/Embed frameworks as explained here. Besides linking RxSwiftUtilities, you will also need to link RxSwift and RxCocoa.

Contributing

Help is always appreciated!

git clone [email protected]:RxSwiftCommunity/RxSwiftUtilities.git
cd RxSwiftUtilities

Or use your own forked repo.

carthage bootstrap

This is necessary in order to be able to build the framework on its own and run tests. However, if you prefer, you can instead develop it while it's within another project.

Before submitting a PR, please make sure that the tests pass.

rxswiftutilities's People

Contributors

bernix01 avatar christophe-chantraine-djm-digital avatar engali94 avatar farshadtx avatar freak4pc avatar lapinou42 avatar nakajijapan avatar rafaelplantard avatar solidcell avatar sylvanasx avatar

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.