当我尝试从“User”类查询所有用户时遇到一些奇怪的问题它找不到任何用户
原文链接:https://www.f2er.com/swift/320147.htmlvar query:PFQuery=PFQuery(className: "User"); query.findObjectsInBackgroundWithBlock { (objects: [AnyObject]!,error: NSError!) -> Void in if !(error != nil) { for(var i=0;i<objects.count;i++){ var object=objects[i] as PFObject; var name = object.objectForKey("username") as String; println(name); } } }
我试过更换
var query:PFQuery=PFQuery(className: "User");
同
var query:PFQuery=PFQuery(className: "AnotherClass");
一切都像我应该的那样奏效.我认为对于“用户”类来说一定是特别的