ios - 在单元格 Swift 中查找 UIText 字段的索引号
问题描述
我现在正在创建一个日历应用程序,我使用了一堆 UITextFields 来组成表格视图单元格的内容。我想获取它所在的 tableView 单元格编号,以便将其保存到,var events: [Dashboard] = []
因为现在每次添加新单元格时,它都会将其全部清除。我确实尝试过使用 EditingDidEnd
func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?) {
let getIndexPathOfSelectionDelageteInstance: getIndexPathOfSelectionDelagete! = nil
getIndexPathOfSelectionDelageteInstance.IndexpathValue(theTitle: (indexPath?.row)!)
}
但它不起作用。它甚至被调用。我假设在表格视图中操作某些东西不算作编辑它。
有人能帮我吗?谢谢。
解决方案
推荐阅读
- html - 如何使用规范标签?[将我的网站升级为多语言]
- python - 如何使用按钮单击来确定是否已单击/选中检查按钮以运行可执行文件?(与 tkinter)
- react-native - 将 AWS Amplify 数据存储用于社交媒体应用程序是一种好习惯吗?
- vba - 此代码在 .OpenRecordset 处生成错误 3061
- matlab - 欧拉法设置 h 值
- ios - numberOfRowsInSection 调用了未重新加载的部分
- python - 有没有办法重新启动一个scrapy爬虫?
- python - Python - “虽然不是 var”
- javascript - PWA 使用特定 URL 启动 Safari 浏览器
- c# - 使用 C# 和 Xamarin 从 Visual Studio 中的 UITableViewController 调用 Instantiate UIViewController