gpt4 book ai didi

ios - 从 Storyboard的 UICollectionViewFlowLayout 创建 IBOutlet 时出错

转载 作者:行者123 更新时间:2023-11-28 11:35:46 24 4
gpt4 key购买 nike

我正在尝试从我的 Collection View 的流布局属性(在 collectionViewController 中)设置一个 IBOutlet:

@IBOutlet weak var collectionViewLayout: UICollectionViewFlowLayout!

但是,当我连接 socket 时,出现以下 3 个错误:

  • Cannot override 'strong' property with 'weak' property
  • Getter for 'collectionViewLayout' with Objective-C selector 'collectionViewLayout' conflicts with getter for 'collectionViewLayout' from superclass 'UICollectionViewController' with the same Objective-C selector
  • Property 'collectionViewLayout' with type 'UICollectionViewFlowLayout?' cannot override a property with type 'UICollectionViewLayout'

谁能解释一下这是什么意思,我该如何解决?

最佳答案

collectionViewLayoutUICollectionViewController 类的属性。将导出名称更改为其他名称。

关于ios - 从 Storyboard的 UICollectionViewFlowLayout 创建 IBOutlet 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55472239/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com