// // objectsTableViewCell.swift // Objekterkennung in AR mit ARKit und CoreML // // Created by Ufuk Kaan on 22.06.21. // import UIKit import BFWControls protocol objectsTableViewCellDelegate: AnyObject{ func didTapButton(with title: String) } class objectsTableViewCell: UITableViewCell { weak var delegate: objectsTableViewCellDelegate? static let identifier = "objectsTableViewCell" static func nib() -> UINib{ return UINib(nibName: "objectsTableViewCell", bundle: nil) } @IBOutlet var button: UIButton! private var title: String = "" @IBAction func didTapButton(){ delegate?.didTapButton(with: title) } func configure(with title: String){ self.title = title button.setTitle(title, for: .normal) } override func awakeFromNib() { super.awakeFromNib() button.setTitleColor(.link, for: .normal) } }