I need to pass this string value to another viewController. For some reason I am getting a sigabrt error. Can anyone point out what im doing wrong?
Need to pass userIdentityString value to userCellTapped viewcontroller
class GeneralChatroom: UIViewController, UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UITextViewDelegate {
//Get Data of current cell that has been tapped
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath){
//Eliminate highlight after cell is tapped
tableView.deselectRow(at: indexPath as IndexPath, animated: true)
let userIdentityString : String = generalRoomDataArr[indexPath.row].cellUserId
let destinationUID = userCellTapped()
destinationUID.programVar = userIdentityString
destinationUID.performSegue(withIdentifier: "profileTapped", sender: self)
}
}
import UIKit
class userCellTapped: UIViewController {
var programVar : String!
override func viewDidLoad() {
super.viewDidLoad()
print("testbles", programVar)
}
}