首页 > 解决方案 > 如何通过取消按钮中的选择发送打击

问题描述

如何将这个填充的结构传递给我的 func ?

let dict = DictView(viewP: newView, gradiP: gradi, tituloP: titulo, setaP: buttonChevron, textViewP: newTextView)
        buttonChevron.addTarget(self, action: #selector(hideOrShowSave(sender: dict)), for: .touchUpInside)   
    }

    @objc func hideOrShowSave(sender: DictView){
}

标签: swiftstructswift5sender

解决方案


不能将方法标记为@objc好像它们的参数采用了诸如无法桥接到 Objective-C 的结构之类的东西。为什么你认为你的方法需要标记@objc


推荐阅读