After updating my code to swift 1.2 I got stuck on one point
var Question:String! var Answere:String! var Answeres:[String]! var ObjectIDsArray:[String]! var ButtonNumber:String! var ObjectIDsArrayCount:Int! var query : PFQuery = PFQuery(className: "AddonQuiz") query.getObjectInBackgroundWithId(QuestionID){ (ObjectHolder : PFObject?, error : NSError?) -> Void in if error == nil { self.Question = ObjectHolder["ImageLink"] as! String self.Answeres = ObjectHolder["Answeres"] as! Array self.Answere = ObjectHolder["Right"] as! String if self.Answeres.count > 0 {
With mistakes
Cannot assign a value of type 'AnyObject?' to a value of type 'String!' Cannot assign a value of type 'AnyObject?' to a value of type '[String]!' Cannot assign a value of type 'AnyObject?' to a value of type 'String!'
for strings
self.Question = ObjectHolder["ImageLink"] as! String self.Answeres = ObjectHolder["Answeres"] as! Array self.Answere = ObjectHolder["Right"] as! String
Any work for this?
source share