0
セグの準備と巻き戻しの準備の違いは何ですか?私はこれらの両方をXcodeプロジェクトに実装しており、両方とも同じ結果が出ています。私はこれらの機能の両方を実装しているコードは、次のとおり(アンワインドするための準備で)セグの準備とアンワインドの準備の違い - スウィフト3.0
override func prepare(for unwind: UIStoryboardSegue, sender: Any?) {
let variableUnwind = ("StackOverFlow")
if unwind.identifier == "toFirstViewController" {
let hello = unwind.destination as! ViewController
hello.username = textField.text!
print(hello.username)
}
}
と:(アンワインドするための準備で)
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let variableUnwind = ("StackOverFlow")
if segue.identifier == "toFirstViewController" {
let hello = segue.destination as! ViewController
hello.username = textField.text!
print(hello.username)
}
}
ありがとうございました。だから、違いはなく、いずれかを選択する利点はないことを明確にするために? –
ありがとうございました。私はそれに私のコードを変更します。 :-) –