如何设置位于UicollectionView中的按钮的图像,该按钮是三重嵌入的单元格中的图像?

发布于 2025-01-27 05:03:07 字数 324 浏览 2 评论 0原文

我在主视图控制器上,该控制器是嵌入在UitabbarController中的五个。

在主视图控制器中,有一个带有几行的表视图,每个行都嵌入其中一个视图控制器。嵌入在UITATIONVIEW的每一行中的所有视图控制器都包含嵌入式收集视图。我要更改图像的按钮位于上述嵌入式UicollectionView的单元格中。

当用户从uicontextmenuconfigurationdelegate执行特定选定的uiacon(该函数)应该更改按钮的uiimage的函数时,它执行了执行,但是在我在集合视图中滚动之前,按钮的映像不会更改。

我不确定如何解决这个问题?我应该以某种方式传递数据吗?使困惑。

I am on the main view controller which is one of five, embedded in a UITabBarController.

In the main view controller there is a table view with several rows, each of the rows has a view controller embedded in it. All the view controller's which are embedded in each row of the UITableView contain embedded collection views. The button I want to change the image on is located in a cell in the aforementioned, embedded UICollectionView.

When a user executes a specific selected UIAction from UIContextMenuConfigurationDelegate, which calls a function that is supposed to change the button's UIImage's, it executes but the button's image doesn't change until I scroll in the collection view.

I'm not sure how to fix this? Should I pass data somehow? Confused.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文