swift - 如何通过取消按钮中的选择发送打击
问题描述
如何将这个填充的结构传递给我的 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){
}
解决方案
不能将方法标记为@objc
好像它们的参数采用了诸如无法桥接到 Objective-C 的结构之类的东西。为什么你认为你的方法需要标记@objc
?
推荐阅读
- opengl - 对不同组件使用不同数据类型的纹理
- database - 从 TDengine 数据库迁移数据存储
- joomla - 如何修复“调用未定义函数 iconv”joomla 错误
- javascript - 使用 Laravel Inertia 分页在 MUI 数据表中进行服务器端分页
- sql - SQL将冗余值填充到表中
- mongodb - $lookup 后如何在返回的嵌套数组上使用 $project?
- ssms - 如何在 Microsoft SQL Server Management Studio 中隐藏线宽标记?
- java - C# WebSocket SendAsync 异常
- postgresql - pgxpreparedStatement 执行不返回结果(与 fmt.Sprintf 不同)
- python - Google Translate API - 检测语言 + 翻译文档(xlsx、csv)