I am trying to send a single message from the messageArray
to another UIViewController
so that I can load up the message's comments. How can I send the message data structure over when the cell is clicked on?
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: "messageCell") as? feedMessagesCell else {return UITableViewCell()}
let message = messageArray[indexPath.row]
cell.configureCell(content: message.content, userName: message.userName)
return cell
}