gpt4 book ai didi

ios - 解析类通过 For 循环运行

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:12:14 24 4
gpt4 key购买 nike

我的应用使用 Parse.com 提供大部分服务。主屏幕有一个 PFTableViewController,显示某个类的所有对象。我想将所有这些添加为 NSUserActivity,所以我知道我需要通过 for 循环运行它,但对于我来说,想不出如何通过循环运行类以添加每个项目将类放入 NSUserActivity。

到目前为止,在设置表格之前我有什么。

- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
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 = [PFQuery queryWithClassName:@"Prayers"];

// 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;
}

[query orderByDescending:@"createdAt"];


return query;
}

最佳答案

关于ios - 解析类通过 For 循环运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32835274/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com