簡體   English   中英

為什么我可以訪問Core Data中除image屬性之外的所有屬性? (哪個是二進制數據?)

[英]Why am I able to access all of the attributes from Core Data except the image attribute? (Which is binary data?)

我在heightForRowAtIndexPath:執行以下操作:

Post *post = [self.fetchedResultsController objectAtIndexPath:indexPath];

然后在任何我嘗試使用post.image它都說image屬性不存在。 但是我可以很容易地做post.title 我執行了“清理”和“清理構建文件夾”,然后重新啟動了Xcode。

image肯定在Core Data xcdatamodeld文件中,這是我選擇它時的信息:

在此處輸入圖片說明

為什么我無法訪問它?

確保這在您的Post.h

@property (nonatomic, retain) UIImage * image;

和您的Post.m

@dynamic image;

請參閱此帖子以進行方便的自動轉換。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM