Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions RxCocoa/iOS/UINavigationController+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ extension Reactive where Base: UINavigationController {
public var delegate: DelegateProxy<UINavigationController, UINavigationControllerDelegate> {
RxNavigationControllerDelegateProxy.proxy(for: base)
}

/// Installs delegate as forwarding delegate on `delegate`.
/// Delegate won't be retained.
///
/// It enables using normal delegate mechanism with reactive delegate mechanism.
///
/// - parameter delegate: Delegate object.
/// - returns: Disposable object that can be used to unbind the delegate.
public func setDelegate(_ delegate: UINavigationControllerDelegate)
-> Disposable {
return RxNavigationControllerDelegateProxy.installForwardDelegate(delegate, retainDelegate: false, onProxyForObject: self.base)
}

/// Reactive wrapper for delegate method `navigationController(:willShow:animated:)`.
public var willShow: ControlEvent<ShowEvent> {
Expand Down