Skip to content

Instantly share code, notes, and snippets.

@emrepun
Created July 1, 2018 11:08
Show Gist options
  • Save emrepun/439bc37faca5a9428bfb508d9bb12e30 to your computer and use it in GitHub Desktop.
Save emrepun/439bc37faca5a9428bfb508d9bb12e30 to your computer and use it in GitHub Desktop.
random func
func subscribeToUsers() {
//1
let secondVC = tabBarController?.viewControllers?.last as! UserViewController
secondVC.userToShowInFirstVcObservable.subscribe(onNext: { [weak self] user in
//2
self?.userToDisplay.value = user
}).disposed(by: disposeBag)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment