-
-
Save susieyy/f0c37c9f176ffbed4ab72a170b89a540 to your computer and use it in GitHub Desktop.
#swtws
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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