Skip to content

Instantly share code, notes, and snippets.

@aainaj
Created April 22, 2019 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aainaj/78b052de8a9bacfe6756bfcf48fd29db to your computer and use it in GitHub Desktop.
Save aainaj/78b052de8a9bacfe6756bfcf48fd29db to your computer and use it in GitHub Desktop.
final class ViewController: UIViewController {
let containerView = UIView()
let tableView = UITableView()
var dataModel: [String] = ["Jan", "Feb", "March"] {
didSet {
if (dataModel != oldValue) {
tableView.reloadData()
}
}
willSet(newValue) {
// Set label text by this value
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment