//#selectorはovjective-cだから頭に@objcをつける @objc func refreshHandler() { //deadlineTimeに1秒の遅延を追加 let deadlineTime = DispatchTime.now() + .seconds(1) DispatchQueue.main.asyncAfter(deadline: deadlineTime, execute: { [weak self] in if #available(iOS 10.0, *) { self?.tableView.refreshControl?.endRefreshing() } self?.tableView.reloadData() }) }