I hereby claim:
- I am charlag on github.
- I am charlag (https://keybase.io/charlag) on keybase.
- I have a public key ASDCJQpk-E_YkHH9ltpAb2RTm9TKgTdwWl33Ohjb2VwNcQo
To claim this, I am signing this object:
enum AuthCellType: String { | |
case Headline | |
case EmailTextField | |
case NameTextField | |
case PasswordTextField | |
case LoginButton | |
case Separator | |
} | |
extension AuthCellType: IdentifiableType { |
class ViewController: UIViewController { | |
@IBOutlet weak var tableView: UITableView! | |
let disposeBag = DisposeBag() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
tableView.estimatedRowHeight = 44 |
enum LoginScreenState { | |
case ShowLogIn | |
case ShowSignUp | |
var cells: [AuthCellType] { | |
switch self { | |
case .ShowLogIn: | |
return [ | |
.Headline, | |
.Separator, |
let screenState = Variable(LoginScreenState.ShowLogIn) | |
let footerButton = UIButton() |
screenState.asObservable() | |
.map { $0.cells } | |
.map { [AuthSection(model: 0, items: $0)] } | |
.bindTo(tableView.rx_itemsWithDataSource(dataSource)) | |
.addDisposableTo(disposeBag) |
dataSource.animationConfiguration = AnimationConfiguration(insertAnimation: .Fade, | |
reloadAnimation: .Fade, | |
deleteAnimation: .Fade) |
protocol CatalogViewModelFactory { | |
func create(parameters: String) -> CatalogViewModel | |
} | |
struct CatalogViewModelFactoryImpl: CatalogViewModelFactory { | |
func create(parameters: String) -> CatalogViewModel { | |
return CatalogViewModelImpl(something: parameters, | |
productFactory: ProductViewModelFactoryImpl()) // should be resolved for this factory |
I hereby claim:
To claim this, I am signing this object: