ios - 解析类运行通过 For 循环
<p><p>我的应用使用 Parse.com 提供大部分服务。主屏幕有一个 PFTableViewController,显示某个类的所有对象。我想将所有这些添加为 NSUserActivity,所以我知道我需要通过 for 循环运行它,但是对于我的生活,我想不出如何通过循环运行类以添加每个项目类到 NSUserActivity 中。</p>
<p>摆 table 前我所拥有的。</p>
<pre><code>- (id)initWithCoder:(NSCoder *)aDecoder
{
self = ;
if (self) {
// The className to query on
self.parseClassName = @"Prayers";
// Whether the built-in pull-to-refresh is enabled
self.pullToRefreshEnabled = YES;
// Whether the built-in pagination is enabled
self.paginationEnabled = YES;
// The number of objects to show per page
self.objectsPerPage = 20;
}
return self;
}
- (PFQuery *)queryForTable {
NSLog(@"QUERY");
PFQuery *query = ;
// If no objects are loaded in memory, we look to the cache first to fill the table
// and then subsequently do a query against the network.
if (self.objects.count == 0) {
query.cachePolicy = kPFCachePolicyCacheThenNetwork;
}
;
return query;
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>似乎没有真正的 API...请参阅此链接以了解可能的解决方法:</p>
<p> <a href="https://parse.com/questions/all-keys-or-method-or-query-to-determine-common-class-structure-of-all-objects-in-a-class-collection" rel="noreferrer noopener nofollow">https://parse.com/questions/all-keys-or-method-or-query-to-determine-common-class-structure-of-all-objects-in-a-class-collection</a> </p></p>
<p style="font-size: 20px;">关于ios - 解析类运行通过 For 循环,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/32835274/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/32835274/
</a>
</p>
页:
[1]