What is common case for @dynamic usage ?
Posted
by
Forrest
on Stack Overflow
See other posts from Stack Overflow
or by Forrest
Published on 2010-12-24T07:42:09Z
Indexed on
2010/12/24
7:54 UTC
Read the original article
Hit count: 417
There is previous post about difference of @synthesize and @dynamic.
I wanna to know more about dynamic from the perspective of how to use @dynamic usually.
Usually we use @dynamic together with NSManagedObject
// Movie.h
@interface Movie : NSManagedObject {
}
@property (retain) NSString* title;
@end
// Movie.m
@implementation Movie
@dynamic title;
@end
Actually there are no generated getter/setter during compiler time according to understanding of @dynamic, so it is necessary to implement your own getter/setter.
My question is that in this NSManagedObject case, what is the rough implementation of getter/setter in super class NSManagedObject ?
Except above case, how many other cases to use @dynamic ?
Thanks,
© Stack Overflow or respective owner