I was going to extend SceneCoordinator
to add more transitions types like fade and so forth. I was quite successful doing it except of the moment where subject
variable never emits onCompleted
. I need it to reset navigation controller delegate to nil once the transition is done.
Once I do push, pop and again I got this log for the debug code snippet:
// one-off subscription to be notified when push complete
_ = navigationController.rx.delegate
.sentMessage(selector)
.map { _ in }
.debug()
.bind(to: subject)
2018-11-10 16:33:05.757: SceneCoordinator.swift:150 (push(subject:controller:)) -> subscribed
2018-11-10 16:33:06.289: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:07.053: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:12.358: SceneCoordinator.swift:150 (push(subject:controller:)) -> subscribed
2018-11-10 16:33:12.870: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:12.870: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:13.474: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:13.475: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:18.552: SceneCoordinator.swift:150 (push(subject:controller:)) -> subscribed
2018-11-10 16:33:19.064: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:19.064: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:19.065: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:19.669: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:19.669: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
2018-11-10 16:33:19.669: SceneCoordinator.swift:150 (push(subject:controller:)) -> Event next(())
Any help would be appreciated