Skip to content

Instantly share code, notes, and snippets.

@susieyy
Created January 14, 2017 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save susieyy/f0c37c9f176ffbed4ab72a170b89a540 to your computer and use it in GitHub Desktop.
Save susieyy/f0c37c9f176ffbed4ab72a170b89a540 to your computer and use it in GitHub Desktop.
#swtws
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "SecondViewIdentifier" {
let secondViewController = segue.destination as! SecondViewController
// titleNameが初期化されていないため以下行によるviewDidLoadの時点でクラッシュ!
secondViewController.view.addSubView(UILbael())
secondViewController.titleName = "This is a second view!"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment