Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Building a Client App From Scratch (ViewController with Client)
import UIKit
import RxSwift
class ViewController: UIViewController {
private let disposeBag = DisposeBag()
private let client = NewsClient()
override func viewDidLoad() {
super.viewDidLoad()
client.headlines().subscribe(onSuccess: { (response) in
print("Receive news: \(response)")
}, onError: { (error) in
print("Receive error: \(error)")
}).disposed(by: disposeBag)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.