Skip to content

Instantly share code, notes, and snippets.

@IsaAliev
Last active October 18, 2020 08:49
Show Gist options
  • Save IsaAliev/2c6f2a586a844d04dcaa2a9691c6a9e7 to your computer and use it in GitHub Desktop.
Save IsaAliev/2c6f2a586a844d04dcaa2a9691c6a9e7 to your computer and use it in GitHub Desktop.
import UIKit
import RxSwift
class ProfileViewController:
UICollectionViewController,
ViewRepresentable,
RxDataSourceRepresentableView
{
var model: ProfileViewModel!
lazy var dataProvider: RxDataSourceProvider! = model
var itemsDependencyManager: CollectionItemsViewModelDependencyManager?
let disposeBag = DisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
configureCollectionDataSource()
model.setup()
configureCollectionView()
}
convenience init() {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .vertical
self.init(collectionViewLayout: layout)
}
func bindWithModel() { }
private func configureCollectionView() {
collectionView.backgroundColor = .white
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment