Skip to content

Instantly share code, notes, and snippets.

@GE-N
Last active November 29, 2016 10:30
Show Gist options
  • Save GE-N/03fe236e259a2f7b2c0eb5ac6a95ec53 to your computer and use it in GitHub Desktop.
Save GE-N/03fe236e259a2f7b2c0eb5ac6a95ec53 to your computer and use it in GitHub Desktop.
class Table: UITableViewController {
override func viewDidLoad() {
tableView.estimatedRowHeight = 100
tableView.rowHeight = UITableViewAutomaticDimension
tableView.translatesAutoresizingMaskIntoConstraints = false
}
override func tableView(_ tableView: UITableView,
numberOfRowsInSection section: Int) -> Int {
return 1
}
override func tableView(_ tableView: UITableView,
cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell(style: .default, reuseIdentifier: nil)
}
}
let tableVC = Table(style: .plain)
PlaygroundPage.current.liveView = tableVC.view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment