A custom table of 4 cells , each cell has its own identifire . There is a button on the "Change" cell after clicking I change the identifire . And so that everything works, you need to reload the table.
From the UITableViewCell class, I call the UITableViewController class and call the tableView.reloadData method tableView.reloadData
@IBAction func changeBtnAction(sender: UIButton) { CategoryGoodsActivity().changeFlagString("edit") dispatch_async(dispatch_get_main_queue(), { () -> Void in CategoryGoodsActivity().reloadTable() }) } and here is the method in UITableViewController :
func reloadTable() { tableView.reloadData() } CategoryGoodsActivity - это UITableViewController I run the project there is a table with a cell, in the cell there is a button "change" I click on this button, the project drops and gives this error
nil while unwrapping an Optional value
I call delegate and datasource at the table.