![](/img/trans.png)
[英]Why am I seeing this error when changing a Core Data attribute from Integer 16 to String?
[英]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.