SubscriptionPresenter
public final class SubscriptionPresenter<T> where T : ActivityProtocol
A subscription presenter.
-
A feed.
Declaration
Swift
public let feed: Feed
-
Creates an instance of the subscription presenter.
Declaration
Swift
public init(feed: Feed)
-
Subscribe to the feed updates. Keep
SubscriptionId
until subscription is needed. Set it tonil
to unsubscribe.Declaration
Swift
public func subscribe(_ subscription: @escaping Subscription<T>) -> SubscriptionId
Parameters
subscription
a subscription block.
Return Value
a subsction id. See
SubscriptionId
.