Last active
November 29, 2016 10:30
-
-
Save GE-N/03fe236e259a2f7b2c0eb5ac6a95ec53 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
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