我正在尝试设置对象的属性,但它仍然为空。谁能告诉我为什么?
宣言:
@property (nonatomic, strong) ListItem *listItem
这是代码:
NSLog(@"Selected: %@", [self.fetchedResultsController objectAtIndexPath:indexPath]);
[listItem setCategory:[self.fetchedResultsController objectAtIndexPath:indexPath]];
NSLog(@"set %@", listItem);
和输出:
2012-06-28 14:47:43.037 MarketList[10508:fb03] Selected: <Category: 0xb72a9e0> (entity: Category; id: 0xb7252e0 <x-coredata://F9BFC1DF-1D80-477E-9BC6-3C0949AD922F/Category/p2> ; data: {
listItem = "<relationship fault: 0x6d29930 'listItem'>";
name = "Teste 2";})
2012-06-28 14:47:43.038 MarketList[10508:fb03] set (null)