title: Segue and Button programmatically swift
body: <p>I am using iCarousel and I have to create my own button. I want to pass data from the button made programmatically to another view, but I don't have a segue identifier because I created the button programmatically. I don't know if it is possible to create the identifier of the segue programmatically. </p>
  
  <pre><code>button.addTarget(self, action: #selector(buttonAction3), for: .touchUpInside)
          button.setTitle("\(titulos[index])", for: .normal)
          tempView.addSubview(button)
          let myImage = UIImage(named: "modo4.png") as UIImage?
          button.setImage(myImage, for: .normal)
  
  let viewController:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "modo") as! Modo1ViewController
  self.present(viewController, animated: false, completion: nil)
  
  if segue.identifier == "" {
          if let destination = segue.destination as? Modo1ViewController {
              destination.nomb = nombres
          }
  
      }
  </code></pre>