Skip to content
Commits on Apr 29, 2016
  1. debugging documentation for binding to DynamicProperty

    Markus Chmelar committed Apr 29, 2016
Commits on Feb 10, 2016
  1. @seltzered

    Clarify flatten works on both Signal & SignalProducer

    seltzered committed Feb 9, 2016
    Flatten technically works on either a SignalProducer-of-SignalProducers or Signal-of-SignalProducers. The inner stream can also be a Signal (i.e. Signal-of-Signals or SignalProducer-of-Signals)
    
    Example:
    //: ### Flattening - using a Signal-of-SignalProducers
    //:
    let (producerA, lettersObserver) = SignalProducer<String, NoError>.buffer(5)
    let (producerB, numbersObserver) = SignalProducer<String, NoError>.buffer(5)
    let (signal, observer) = Signal<SignalProducer<String, NoError>, NoError>.pipe()
    
    signal.flatten(.Merge)
        .observeNext {next in
        print("merged next: \(next)")
    }
    
    observer.sendNext(producerA)
    observer.sendNext(producerB)
    lettersObserver.sendNext("hi")
    numbersObserver.sendNext("1")
    
    //: ### Flattening - using a Signal-of-Signals
    //:
    let (sigA, lettersObserver) = Signal<String, NoError>.pipe()
    let (sigB, numbersObserver) = Signal<String, NoError>.pipe()
    let (mergeSignal, mergeSigObserver) = Signal<Signal<String, NoError>, NoError>.pipe()
    
    mergeSignal.flatten(.Merge)
        .observeNext {next in
            print("merged next: \(next)")
    }
    
    mergeSigObserver.sendNext(sigA)
    lettersObserver.sendNext("hi")          //prints hi
    numbersObserver.sendNext("1")          //prints nothing
    mergeSigObserver.sendNext(sigB)        //prints nothing since a signal has no buffer
    numbersObserver.sendNext("2")          //prints 2
    
    //: ### Flattening - using a SignalProducer-of-Signals
    //:
    
    let (sigC, sigCObserver) = Signal<String, NoError>.pipe()
    let (sigD, sigDObserver) = Signal<String, NoError>.pipe()
    let (mergeSignalProducer, mergeSigProdObserver) = SignalProducer<Signal<String, NoError>, NoError>.buffer(1)
    
    mergeSignalProducer.flatten(.Merge)
        .startWithNext{next in
            print("merged next: \(next)")
        }
    
    mergeSigProdObserver.sendNext(sigC)
    sigCObserver.sendNext("hi")           //prints hi
    sigDObserver.sendNext("1")           //prints nothing
    mergeSigProdObserver.sendNext(sigD)//prints nothing since a signal has no buffer
    sigDObserver.sendNext("4")           //prints 4
Commits on Jan 9, 2016
  1. @JuIioCesar
Commits on Jan 7, 2016
  1. @mingliangfeng
Commits on Oct 23, 2015
  1. @bencochran
Commits on Oct 20, 2015
  1. @chenjsa

    Update BasicOperators.md

    chenjsa committed Oct 20, 2015
    Added space before '{'.
Commits on Oct 19, 2015
  1. @chenjsa

    Update BasicOperators.md

    chenjsa committed Oct 19, 2015
Commits on Oct 17, 2015
  1. @chenjsa

    Update BasicOperators.md

    chenjsa committed Oct 17, 2015
  2. @chenjsa

    Update BasicOperators.md

    chenjsa committed Oct 17, 2015
  3. @chenjsa

    Update BasicOperators.md

    chenjsa committed Oct 17, 2015
    Replaced 'println' with 'print'.
Commits on Oct 8, 2015
  1. @andymatuschak

    Updated documentation for new observer API

    andymatuschak committed Oct 7, 2015
    Test plan: Crossed fingers.
Commits on Sep 21, 2015
  1. @nikita-leonov
  2. @nikita-leonov
  3. @nikita-leonov

    Fixed spelling.

    nikita-leonov committed Sep 21, 2015
  4. @nikita-leonov

    Fixed spelling.

    nikita-leonov committed Sep 20, 2015
  5. @nikita-leonov

    Fixed spelling.

    nikita-leonov committed Sep 20, 2015
  6. @nikita-leonov
  7. @nikita-leonov
  8. @nikita-leonov

    Fixed formatting.

    nikita-leonov committed Sep 20, 2015
  9. @nikita-leonov

    Fixed formatting.

    nikita-leonov committed Sep 20, 2015
  10. @nikita-leonov

    Fixed spelling.

    nikita-leonov committed Sep 20, 2015
  11. @nikita-leonov

    Added debugging techniaues document with an explanation of signals ch…

    nikita-leonov committed Sep 20, 2015
    …ains debugging approach.
Commits on Sep 3, 2015
  1. @ikesyo

    Merge branch 'master' into merge-master

    ikesyo committed Sep 3, 2015
    # Conflicts:
    #	ReactiveCocoa/Swift/Disposable.swift
Commits on Aug 20, 2015
  1. @yoichitgy
Commits on Jul 30, 2015
  1. @richeterre

    Fix link in Design Guidelines

    richeterre committed Jul 30, 2015
Commits on Jul 29, 2015
  1. @natan
Commits on Jul 28, 2015
  1. @neilpa
  2. @neilpa

    Merge branch 'master' into swift2

    neilpa committed Jul 28, 2015
Commits on Jul 18, 2015
  1. @jspahrsummers
  2. @neilpa
  3. @jspahrsummers

    Merge pull request #2177 from ReactiveCocoa/pr/2165

    jspahrsummers committed Jul 17, 2015
    Objective-C bridging documentation (redux)
Commits on Jul 16, 2015
  1. @jspahrsummers
  2. @jspahrsummers

    Re-add TOC breakdown

    jspahrsummers committed Jul 15, 2015
  3. @jspahrsummers

    *associated with

    jspahrsummers committed Jul 15, 2015
  4. @jspahrsummers
Something went wrong with that request. Please try again.