如何快速获取 scoop 中的变量以便我可以向其传递数据?

发布于 2025-01-13 04:48:00 字数 395 浏览 2 评论 0原文

当我的序列号标签位于不同的文件中时,如何在 itemsviewController 的勺子中获取我的序列号标签,我将把它放在哪里,因为我是 swift 的新手,我知之甚少,请帮助

这是我的视图控制器

这是我的 tableCell TableViewCell

how do I get my serialnumberLabel in scoop of the itemsviewController when its in a different file and where would I put it because I'm new to swift I know very little please help

this is my viewcontroller

THIS is my tableCell TableViewCell

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

于我来说 2025-01-20 04:48:00

您应该在 completionHandle 闭包中重新加载当前 tableView,并将 text 存储在 ItemsViewController 中,然后更新 serialNumberLabel.text 中的 >tableView(_:cellForRowAt:)

You should reload current tableView in completionHandle closure and store text in ItemsViewController, then update serialNumberLabel.text in tableView(_:cellForRowAt:).

美男兮 2025-01-20 04:48:00

您需要按步骤更改逻辑:

步骤1:为表视图创建列表通用模型

步骤2:当您修改项目时,为表视图中的通用模型设置。

Step3:回调item时只能调用reload table view。

全部完成。

You need to change logic by steps:

Step1: Make a list common model for table view

Step2: when you modify item you set for model common in table view.

Step3: when you callback item you can only call reload table view.

All done.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文