I am writing UIAlert and UIAlertAction and I want to add performSeque to handler in UIAlertAction but I keep getting this error: "Cannot use instance member 'performSegue' within property initializer; property initializers run before 'self' is available"
here is my code
here is my code
Code Block let alert = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert) let action = UIAlertAction(title: "Title", style: .default, handler: { action in performSegue(withIdentifier: "goToVC", sender: nil) })