Swift / Parse - “AnyObject不能转换为String”

时间:2015-09-15 05:45:56

标签: swift parse-platform

我试图从swift中收到一个来自Parse的字符串,但是我收到一个错误说: AnyObject is not convertible to String这是我的代码:

var query = PFQuery(className:"NewsClass")
query.getObjectInBackgroundWithId("5tZMCa5XyX") {
    (news3: PFObject?, error: NSError?) -> Void in
    if error == nil && news3 != nil {
        println(news3)
        let description3 = news3["Description"] as! String


    } else {
        println(error)
    }
}

0 个答案:

没有答案