Tutorial by Examples

FRP, or Functional Reactive Programming, has some basic terms which you need to know. Every piece of data can be represented as Observable, which is an asynchronous data stream. The power of FRP is in representation synchronous and asynchronous events as streams, Observables, and providing the same...
RxSwift offers many ways to create an Observable, let's take a look: import RxSwift let intObservale = Observable.just(123) // Observable<Int> let stringObservale = Observable.just("RxSwift") // Observable<String> let doubleObservale = Observable.just(3.14) // Observable&...
After the subscription was created, it is important to manage its correct deallocation. The docs told us that If a sequence terminates in finite time, not calling dispose or not using addDisposableTo(disposeBag) won't cause any permanent resource leaks. However, those resources will be used unti...
Observable.combineLatest(firstName.rx_text, lastName.rx_text) { $0 + " " + $1 } .map { "Greetings, \($0)" } .bindTo(greetingLabel.rx_text) Using the combineLatest operator every time an item is emitted by either of two Observables, combine the latest item emitted by each Obs...
RxSwift provides not only the ways to control your data, but to represent user actions in a reactive way also. RxCocoa contains everything you need. It wraps most of the UI components' properties into Observables, but not really. There are some upgraded Observables called ControlEvents (which repre...

Page 1 of 1