Skip to content

Instantly share code, notes, and snippets.

View MetzoPaino's full-sized avatar

William Robinson MetzoPaino

View GitHub Profile
@IBAction func shareButtonPressed(_ sender: UIBarButtonItem) {
tableView.backgroundColor = UIColor.white
let contentSize = tableView.contentSize
let originalFrame = tableView.frame
let fullFrame = CGRect(x: tableView.frame.origin.x, y: tableView.frame.origin.y, width: tableView.frame.size.width, height: tableView.contentSize.height)
tableView.frame = fullFrame
tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: UITableViewScrollPosition.top, animated: false)