我正在寻找解决方案的一个小问题, 我声明了一个按钮i的电池类:如何从另一个类获得财产继承权不
class MyCell: UICollectionViewCell {
@IBOutlet weak var button: UIButton!
}
但现在我试图从我的主类可以访问按钮的变量,如果视图被加载的按钮应该被隐藏,并在几个功能按钮应该再次强调:
class mainClassController: UICollectionViewController, UICollectionViewDelegateFlowLayout {
// here I try to create reference to the button variable
...
}
你应该对UICollectionViewDataSource中的每个单元都这样做 – Matz