[英]Parse.com: PFQueryTableViewController with PFUser
I am using the Parse.com framework with my iOS app. 我在我的iOS应用程序中使用了Parse.com框架。 I want to have two section in an
UITableView
. 我想在
UITableView
有两个部分。 I read that I can use the PFQueryTableViewController
to query data from the parse cloud and have it in a UITableView
. 我读到可以使用
PFQueryTableViewController
从解析云查询数据并将其保存在UITableView
。 How can I use PFQueryTableViewController
to query the User
class usernames
to be in one section of the UITableView
, and the friends
of the currentUser
to be in the other section of the UITableView
, friends
is an array variable that I made every PFUser
have. 我如何使用
PFQueryTableViewController
来查询PFQueryTableViewController
User
usernames
在UITableView
,而currentUser
的friends
在UITableView
的另一部分中, friends
是我让每个PFUser
拥有的数组变量。 How would I do this? 我该怎么做?
PFQueryTableViewController
类实际上仅打算用于单个查询-您的需求需要执行两个查询(一个查询用于currentUsers
的朋友,一个查询用于所有User
的username
。如果是的话,我将实现我自己的表视图控制器,该控制器在后台分别执行两个查询,并在从parse返回tableView
每个部分的数据时管理自己对reloadData
的调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.