问题标签 [pfquery]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
uitableview - PFQueryTableViewController 不显示自定义单元格
我有一个 PFQueryTableViewController 的子类,我试图在容器视图中显示(作为子视图)。我的问题是我无法让自定义单元格显示在表格视图中。我通过调试验证了以下内容:
- 表视图被添加到父视图
- tableview 是一个 PFQueryTableView 控制器,因为它包括默认的拉刷新
- PFQuery 正在返回正确数量的对象
- 正在调用 CellForRowAtIndexPath 方法并迭代正确的次数
- 来自 Parse 的正确数据被传递到单元格中的不同标签
- 标签通过我的 UITableViewCell 子类中的 IBOulet 连接。当我尝试访问标签时,它在访问子类和标签时工作正常
我在这里一切正常,除了单元格实际出现了!我错过了什么?
这是我的 cellForRowAtIndexPath 代码:
ios - 在 TableView 上显示标签。滚动 TableView 时消失
我有一个带有隐藏标签的 TableView,只有当我通过 didSelectRow 单击单元格时才会出现。
到目前为止一切顺利,当我选择单元格时,会显示橙色标签(如您从图像中看到的那样),但是当 tableView 滚动时出现问题,标签橙色消失并且只有在我更改页面时才会返回......
橙色标签指示好友请求是否处于待处理状态,并通过 prepareforsegue 报告的可变数组来引用另一个页面中存在的查询。
你能解释为什么橙色标签消失了吗?当我选择单元格时,如何让它留在 TableView 上?橙色标签是“RichiestaInAttesaLabel” Ps 我正在使用 Parse.com
ios - 从解析查询中保存 PFObjects
我想将 Parse 查询中的 PFObjects 保存在我的班级称为 listdata 的 NSMutableArray 中。稍后我将使用 listdata 数组。当我跟踪我的代码时,它为找到的每个对象更新了 highScoreObjects 数组。但是当我尝试将 listdata 数组设置为 highScoreObjects 数组时,highScoreObjects 数组为空。有没有办法在查询结束后保留数据?
我还尝试将线路保持self.listData = highScoreObjects;
在self.listData = highScoreObjects;
循环内。这没有任何区别。
ios - 当我运行时,PfQuery 或 QueryWithSubqueries 崩溃应用程序
大家好,我正在与我一起工作,我正在使用 parse.com PFQuery 或 QuerywithSubqueries
到目前为止,一切都运行良好,现在我需要添加第四个查询,但是当我运行时应用程序不断崩溃......有谁知道为什么会发生这种情况?
ios - PFQuery 和 PFRelation 应用程序在运行时崩溃
大家好,我想向那些可以'给我的人寻求帮助......在您开始使用特定 Parse.com 作为我的应用程序中数据的管理器之前,在我的 FILE.h 中,我创建了一个名为 PostDetails 的 PFObject
我 file.m 中的 PostDetail 在 TableView 中用于显示帖子列表。
我的应用程序的用户可以创建一个包含 PFRelation 帖子的报告
现在要检索当前用户与某个帖子的所有关系,我创建了这个查询
我的问题是,当我运行时,应用程序崩溃并在这一行给我断点......我在哪里做错了?
我为我表达自己的方式道歉,但我使用的翻译不是以英语为母语的人......我希望这一切都可以理解......再次抱歉......
ios - 带有自定义单元格的 PFQueryTableViewController 在启动时崩溃
我有一个要使用自定义单元格的 PFQueryTableViewController 子类 (DebateQueryViewController)。DebateQueryViewController 在情节提要中,我的自定义单元格有 .xib。我还为单元格创建了 .h 和 .m 文件,但我没有更改其中的代码,除了在 xib 文件中添加标签的出口等。
在 DebateQueryViewController.m 文件的 viewDidLoad 方法中,我有这个:
我也有这两种方法:
在我尝试实现自定义单元之前,一切都运行良好,但现在应用程序每次都会在启动图像上崩溃。
ios - 尝试在 Parse 中查询特定用户的 PFRelation
我正在尝试查询应用程序当前用户的 PFRelation 以加载显示所有用户朋友的表格视图。每个用户在第一次使用该应用程序时都保存在一个名为“User”的类下,一旦他们添加了一个朋友,该朋友就会被添加到该用户的“friendsRelation”列中。我正在使用从这个链接获得的这段代码,查询没有返回任何内容。
ios - Parse.com QueryForTable 方法
我使用 parse.com 作为数据库。我的 tableViewController 是一个 PFQueryTableViewController 类,如下所示:
我的表不显示任何内容。当我记录 _exerciciosArray 时,它看起来像这样:
{\n cep = \"25553-555\";\n cidade = \"Rio de Janeiro\";\n email = \"blabla@globo.com\";\n endereco = \"Rua Oscar 100/500 \";\n estado = \"里约热内卢\";\n exercicio1 = \"\";\n exercicios = (\n \" {\n Title = \\"Rosca no Pulley\\";\n }\",\n \" {\n Title = \\"Rosca no Pulley\\";\n}\"\n );\n nascimento = \"12/02/1888\";\n nome = Jorge;\n pais = 巴西;\n sobrenome = Junior;\n 电话 = \"(21) 9999-9999\";\n 用户名 = \"blabla@globo.com\";\n}"
ios - My array is populated but I still get the error: index 0 beyond bounds for empty array'
I've tried a lot of options to solve this, and it seems that a lot of people get the same error, but I've tried some answers but couldn't fix.
This is how I call my second PFQueryTableViewConttoller:
Now, When I click the first option, which is Serie A, it takes me to second PFQueryTableViewController, and when method NumberofRowsInSection is not present (commented), My TableView shows two items with the following code, although my array has 4 items and it should show four.
When I insert the method NumberOfRowsInSection:
If i put a Log there, it shows array populated with 4 items. Although with the above code I get crash with message: [__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
I have tried a lot of things, but nothing seems to work.
Any help is appreciated. Thanks.
ios - parse.com PFQueryTableViewController 多次返回同一个对象
我正在尝试使用(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object
自定义PFObject
数据在PFQueryTableViewController
. 因此,我在我的对象中构造我的对象PFQuery
,该对象应该在.(PFQuery *)queryForTable
PFQueryTableViewController
delegate
NSArray
我认为 parse.com 应该(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object
为每个返回的对象发送/调用一次。但是,我发现它会多次返回同一个对象。
因此,例如,(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object
我得到的是同一个对象,而不是 3 次调用 3 个不同的对象。但这不是数据或查询的问题,因为在结束时(PFQuery *)queryForTable
,就在之前
我试过
这显示了正确获得的 3 个对象。如何通过调用3 次处理完全相同的查询,而不是一个一个地发送 3 个对象,而是发送第一个对象 3 次?PFQueryTableViewController
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object
针对 Wain 的问题,我在评论中添加了一些答案,但以下内容似乎也很相关: