大家好,我想向那些可以给我的人寻求帮助...在开始使用特定的Parse.com作为应用程序中数据的管理器之前,在我的FILE.h文件中,我创建了一个名为PostDetails的PFObject。
我的file.m中的PostDetail在TableView中用于显示帖子列表。
我的应用程序的用户可以'通过PFRelation用帖子创建报告
现在,要检索当前用户与特定帖子的所有关系,我创建了此查询
- (void) LoadDataGoPointAssigned {
FFCustomCellWithImage CCIButtonAddGoPoint * = [ [ FFCustomCellWithImage alloc] init ] ;
self.RelationForGoPointAssignToPost = [ [ PFUser currentUser ] objectForKey : @ " PostGoPoint "];
PFQuery QueryForPostGoPoint * = [ self.RelationForGoPointAssignToPost query ] ;
[ QueryForPostGoPoint whereKey : @ " objectId " equalTo : self.PostDetails.objectId ] ;
[ QueryForPostGoPoint findObjectsInBackgroundWithBlock : ^ ( NSArray * objects, NSError * error ) {
if ( error) {
Else { }
if ( [ objects count] > 0) {
CCIButtonAddGoPoint.AddGoPoint.selected = YES ;
UIImage * ButtonDisable = [ UIImage imageNamed : @ " FFIMG_Medal_Blu "];
[ CCIButtonAddGoPoint.AddGoPoint setImage : ButtonDisable forState : UIControlStateNormal ] ;
}}
} ] ;
}
我的问题是,当我运行时,应用程序崩溃,并在此行中给我断点...我在哪里做错了?
[QueryForPostGoPoint whereKey:@"objectId" equalTo:self.PostDetails.objectId];
我为自己的表达方式而道歉,但我使用的不是英语为母语的翻译人员,我希望所有这些内容都是可以理解的,再次抱歉...
在这一行上,您可以看到类名周围有多余的空格PostGoPoint
。
self.RelationForGoPointAssignToPost = [ [ PFUser currentUser ] objectForKey : @ " PostGoPoint "];
当使用whereKey来访问类名时,它可能会失败。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句