我正在寻找二进制数据和字符串,二进制数据应该是“setPropertiesToFetch”。我已经成功地获取了字符串,但是当我获取二进制数据时,它只返回内存地址而不是实际内容。
我当前的代码:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:id(id)sender
{
TBAppDelegate *delegate = (TBAppDelegate *)[[UIApplication sharedApplication] delegate];
managedObjectContext = [delegate managedObjectContext];
NSFetchRequest *requestGroups = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Group" inManagedObjectContext:managedObjectContext];
[requestGroups setFetchBatchSize:INFINITY];
[requestGroups setEntity:entity];
[requestGroups setReturnsDistinctResults:YES];
NSMutableArray *urls = [NSKeyedUnarchiver unarchiveObjectWithData:self.group.selectedurl];
[requestGroups setPropertiesToFetch:urls];
[requestGroups setResultType:NSDictionaryResultType];
NSError *error;
self.groups = [managedObjectContext executeFetchRequest:requestGroups error:&error];
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
TBGroupsDetailViewController *detailsController = segue.destinationViewController;
detailsController.group_name = [self.groups objectAtIndex:indexPath.row];
}
正如我之前所说,有没有办法将属性设置为二进制数据类型?