現在、アプリの機能の一部としてViewController間の値渡しをsegueを用いて行おうとしています。
TextFieldで入力した値を次のViewControllerへ渡そうとしています。
値渡しの部分を下記の通り、実装しているのですが、エラーが出ます。
※1 gotabelnum : segueのidentity
※2 circle : 現在のviewcontroller
※3 circle2 : 遷移先のviewcontroller
override func prepareForSegue(segue: UIStoryboardSegue, sender: Any?) {
エラー1:Method does not override any method from its superclass
if segue.identifier == "gotablenum"{
let circle2:circle2 = segue.destinationcircle as circle2
circle2.text = self.textField.text
}
エラー2:Value of type 'UIStoryboardSegue' has no member 'destinationcircle'
エラー3:Value of type 'circle2' has no member 'text'
}
初歩的なミスかもしれませんか、どなたかご支援をお願い致します。
回答1件
あなたの回答
tips
プレビュー