解析平台 - '!=' 不是前缀一元运算符 (SWIFT)



Swift和Parse有问题,遵循在线教程,该教程已更新到Swift1.2,但我收到错误,该教程不是。论坛上没有任何内容,也没有其他问题。多亏了这里和其他学生,我已经找到并解决了一些小问题。但这一次我被卡住了。

它提出了:-

if(self.object!=nil){'!='不是前缀一元运算符"

var object: PFObject!
override func viewDidLoad() {
    super.viewDidLoad()
    if (self.object !=nil) {
        self.dateField?.text = self.object["date"] as? String
        self.detailsField?.text = self.object["details"] as? String
    }else {
        self.object = PFObject(className: "incident")
    }
    // Uncomment the following line to preserve selection between presentations
    // self.clearsSelectionOnViewWillAppear = false
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem()
}

在!=和零。

最新更新