Skip to content

Instantly share code, notes, and snippets.

@IsaAliev
Created October 18, 2020 08:42
Show Gist options
  • Save IsaAliev/7b052667ac5eabad0bddb04d2e4f98cf to your computer and use it in GitHub Desktop.
Save IsaAliev/7b052667ac5eabad0bddb04d2e4f98cf to your computer and use it in GitHub Desktop.
import RxSwift
class ProfileViewModel: ViewModel, RxDataSourceProvider {
let collectionData = BehaviorSubject<[SectionData]>(value: [])
lazy var profile: Profile = {
let decoder = JSONDecoder()
let url = Bundle.main.url(forResource: "info", withExtension: "json")!
return try! decoder.decode(Profile.self, from: .init(contentsOf: url))
}()
func setup() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment