Swift / Parse - 更新数据时没有与查询匹配的结果

时间:2016-06-22 15:40:52

标签: ios swift parse-platform

我最近一直在玩解析,是的,我知道它即将关闭:(。我有这个错误但是一直在上升。我正在尝试更新我的textview.text来解析每一秒但是,当代码运行时,会出现一条消息说"没有结果与查询匹配",即使textview.text不为空。我真的很感谢你的帮助。谢谢。

 override func viewDidLoad() {

    super.viewDidLoad()
    notes["Content"] = detailDescriptionLabel.text
    notes.saveInBackgroundWithBlock { (succes, error) -> Void in
        if error != nil {
            print("unable to save objects")
        }
    }
    scheduledTimerWithTimeInterval()


    // Do any additional setup after loading the view, typically from a nib.
    self.configureView()

}


func scheduledTimerWithTimeInterval(){
    // Scheduling timer to Call the function **Countdown** with the interval of 1 seconds
    timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: Selector("updateText"), userInfo: nil, repeats: true)
}

func updateText () {

            let query = PFQuery(className: "Notes")

            query.getObjectInBackgroundWithId("Content") { (notes, error) -> Void in

            notes?["Content"] = self.detailDescriptionLabel.text
            print("Updated")
            }


}

Picture of error in Log Image of Parse Dashboard

0 个答案:

没有答案