I have an array of data that is taken from the site and output to the table, I want to add a button that will store a certain row from the table in the database how can I implement it?
let cell = tableView.dequeueReusableCell(withIdentifier: "LabelCell", for: indexPath)
cell.textLabel?.text = news[indexPath.row].tittle
let tipDouble = NumberFormatter().number(from: news[indexPath.row].time!)!.doubleValue
let date = Date(timeIntervalSince1970: tipDouble)
let dateFormatter = DateFormatter()
dateFormatter.timeZone = TimeZone(abbreviation: "GMT+2") //Set timezone that you want
dateFormatter.locale = NSLocale.current
dateFormatter.dateFormat = "MM-dd HH:mm" //Specify your format that you want
let strDate = dateFormatter.string(from: date)
cell.detailTextLabel?.text = strDate
return cell