I want to take a variable nomeLabel in the func goToSecondView and display it on a SecondView
class ViewController: UIViewController {
var nomeLabel:String!
@IBAction func goToSecondView(sender: AnyObject) {
self.performSegueWithIdentifier("goToSecondView", sender: self)
let newButton = sender as UIButton
nomeLabel = newButton.titleLabel!.text
println("nomeLabel \(nomeLabel)")
}
}
how can I do ?