您好我一直在尝试测试 Parse PFQueryTableViewController 的功能...但是一直收到以下错误:
[错误]:类名中的错误字符:(null)(代码:103,版本:1.8.0)
我正在使用 Parse 网站上的标准代码来执行此操作并尝试从我的 Pase 类中加载 tableviewcontroller:Categories 即:
- (instancetype)initWithStyle:(UITableViewStyle)style {
self = [super initWithStyle:style];
if (self) { // This table displays items in the Todo class
self.parseClassName = @"Categories";
self.pullToRefreshEnabled = YES;
self.paginationEnabled = YES;
self.objectsPerPage = 25;
}
return self;
}
- (PFQuery *)queryForTable {
PFQuery *query = [PFQuery queryWithClassName:self.parseClassName];
// 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;
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
object:(PFObject *)object {
static NSString *cellIdentifier = @"categoryCell";
PFTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
cell = [[PFTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:cellIdentifier];}
// Configure the cell to show todo item with a priority at the bottom
cell.textLabel.text = object[@"Category"];
cell.detailTextLabel.text = object[@"Sequence"];
return cell;
}
任何帮助都将得到很好的充分接受,谢谢。