UITableViewDelegate
のメソッドtableView(_:editActionsForRowAt:)
を利用します。UITableViewRowAction
クラスについて、リファレンスでお調べください。
サンプルコードを載せておきます。テーブルの設定は、Storyboard上で行なっている前提になっています。
import UIKit
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 12
}
// UITableViewDataSource
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
cell.textLabel?.text = "No. \(indexPath.row)"
return cell
}
// UITableViewDelegate
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
let action = UITableViewRowAction(style: .default, title: "Detail"){ action, indexPath in
// Do anything
}
return [action]
}
}
// Do Anything
の箇所に、ボタンをタップした時の処理を記述します。

UITableViewRowAction
でネット検索すると、お求めになっている情報が集まるのではないでしょうか?