Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ViewController内に配置されたUIViewからUIViewコントローラーで定義されたメソッドを呼び出す方法。
これが不可能な場合、UIView内に配置されたボタンをセグエと呼ぶにはどうすればよいですか?
これを理解しようと何時間も費やしました。
そのため、1日かかりましたが、簡単な回避策を見つけることができました。
UIView.hでUIVIewControllerプロパティを作成し、ViewControllerでUIViewsプロパティを.selfに設定します。
UIView内でこれを行うと、そのプロパティにアクセスでき、そこから準備を呼び出すことができます。