如何创建像UIAlertController一样的可重用ViewController(我们称之为“reusableVC”)。ReusableVC具有“确定”按钮,该按钮将根据调用resuableVC的位置进行操作。我知道代表和NotificationCenter。只是想知道我们是否可以在创建可重用VC时传递“确定”按钮应该做什么,如下所示:reusableVC.addAction(UIAlertAction(title:"",style:.default,handler:{(action)in//somecode})) 最佳答案 如