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.
我正在使用 IBOutlet Collection,其中所有按钮都会弹出另一个 VC,如何将多个按钮链接到同一个 VC?
[
我试过 ctrl 并将选定的按钮拖到新的 VC 但只有一个按钮连接
您应该IBAction在代码中创建一个(从一个按钮拖动到您的代码),然后在该函数调用 self?.present(toVC, animated: true, completion: nil)中(填写您需要的内容),一旦完成,只需从点(函数旁边)拖动到你的按钮。
IBAction
self?.present(toVC, animated: true, completion: nil)