开发者

iOS: Using Three20 TTPhoto with NSManagedObject

I am using Three20's TTPhoto with NSManagedObject:

@interface Photo : NSManagedObject <TTPhoto> {
}

@property (nonatomic, retain) NSString * caption;
@property (nonatomic, retain) Album * photoSource;

// ...

@end

The above properties are given by Core Data (My Album class does comply to the TTPhotoSource protocol). Now, my problem is that the TTPhoto protocol requi开发者_Go百科res slightly different properties:

@property (nonatomic, copy) NSString * caption;
@property (nonatomic, assign) id<TTPhotoSource> photoSource;

How can I make the NSManagedObject properties comply to the TTPhoto protocol (mind the difference in retain vs. copy/assign)?

(the photo.m files contains the standard @dynamic caption, @dynamic photoSource)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜