开发者

iOS: Using Three20 TTPhoto with NSManagedObject

开发者 https://www.devze.com 2023-02-06 00:59 出处:网络
I am using Three20\'s TTPhoto with NSManagedObject: @interface Photo : NSManagedObject <TTPhoto> {

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

精彩评论

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