Reactive
public struct Reactive<Base>
A proxy which hosts reactive extensions of Base
.
-
The
Base
instance the extensions would be invoked with.Declaration
Swift
public let base: Base
-
Returns a Signal to observe posting of the specified notification.
Note
The signal does not terminate naturally. Observers must be explicitly disposed to avoid leaks.
Declaration
Swift
public func notifications(forName name: Notification.Name?, object: AnyObject? = nil) -> Signal<Notification, Never>
Parameters
name
name of the notification to observe
object
an instance which sends the notifications
Return Value
A Signal of notifications posted that match the given criteria.
-
Returns a SignalProducer which performs the work associated with an
NSURLSession
Note
This method will not send an error event in the case of a server side error (i.e. when a response with status code other than 200…299 is received).
Declaration
Swift
public func data(with request: URLRequest) -> SignalProducer<(Data, URLResponse), Error>
Parameters
request
A request that will be performed when the producer is started
Return Value
A producer that will execute the given request once for each invocation of
start()
.