Tag: UIKit/テーブル/Tips
override func viewDidLoad() { super.viewDidLoad() self.tableView.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0) self.tableView.backgroundColor = UIColor.grayColor() }
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if let indexPath = tableView.indexPathForSelectedRow { tableView.deselectRow(at: indexPath, animated: animated) } for cell in tableView.visibleCells { } }