【问题标题】:Cannot assign to 'xxx' in 'self'无法分配给“自我”中的“xxx”
【发布时间】:2014-08-22 13:33:39
【问题描述】:

我得到了这个编译器错误:Cannot assign to 'sci' in 'self'

class LCCVC: UICollectionViewCell {

    override func touchesEnded(touches: NSSet!, withEvent event: UIEvent!) {
        super.touchesEnded(touches, withEvent: event)

        sci = nil
    }
}

sci 是在其他文件中声明的全局变量,如下所示:

var sci: NSManagedObject?

【问题讨论】:

    标签: ios swift xcode6-beta6


    【解决方案1】:

    我在该类中有一个名为 sci() 的方法,导致编译器错误。

    【讨论】:

      猜你喜欢
      • 2019-04-30
      • 2015-06-22
      • 1970-01-01
      • 1970-01-01
      • 2016-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多