在更新到 XCode 8.3 时对 swift 3 中的标签框架和"-"的不明确引用



我将 Xcode 更新到 8.3 版,并在重新打开我的项目时开始收到以下错误。

  1. 对成员"-"的不明确引用

    let frame = (frame: CGRect(x: 80.0, y: 140.0, width: ((self.view.bounds.size.width - 160.0)), height: 40))
    
  2. 对成员"框架"的模糊引用

    let frame2 = (frame: CGRect(x: 80.0, y: self.loginButton.frame.maxY + 40.0, width: (self.view.bounds.size.width - 160.0), height: 40))
    

那额外的frame:是什么?

只需做:

let frame = CGRect(x: 80.0, y: 140.0, width: self.view.bounds.size.width - 160.0, height: 40)

和:

let frame2 = CGRect(x: 80.0, y: self.loginButton.frame.maxY + 40.0, width: self.view.bounds.size.width - 160.0, height: 40)

最新更新