We can use DelegateProxy and DelegateProxyType to make beautiful delegate with RxSwift. But in some other cases, we can just create a custom class with PublishSubject.
This is how we can make rx out of UIApplication life cycle events
classLifeCycle{ let didEnterBackground = PublishSubject<Void>() let willEnterForeground = PublishSubject<Void>() let didBecomeActive = PublishSubject<Void>() let willResignActive = PublishSubject<Void>()
init() { let center = NotificationCenter.default let app = UIApplication.shared