Last active
August 22, 2017 14:43
-
-
Save MartinMoizard/ca6f4e5a895c558197ff5861388ec30f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// TableViewCells | |
final class TextFieldCell: UITableViewCell { | |
@IBOutlet weak var nameTextField: UITextField! | |
} | |
final class ButtonCell: UITableViewCell { | |
@IBOutlet weak var validateButton: UIButton! | |
} | |
final class GreetingCell: UITableViewCell { | |
@IBOutlet weak var greetingLabel: UILabel! | |
} | |
/// ViewController | |
final class SayHelloViewController: UIViewController, UITableViewDataSource { | |
static let cellIdentifiers = [ | |
"TextFieldCell", | |
"ButtonCell", | |
"GreetingCell" | |
] | |
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
return TableViewController.cellIdentifiers.count | |
} | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
// Classic dequeue work | |
} | |
private let viewModel = SayHelloViewModel() | |
private let bag = DisposeBag() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
bindViewModel() | |
} | |
private func bindViewModel() { | |
// Let's discuss about this | |
let inputs = SayHelloViewModel.Input(name: 😱😱, validate: 😱😱) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment