what @property setup exactly? and "getter=" do?
1. Please confirm if I understand this correctly.
I have a line of code below,
@property (strong, nonatomic) Month *august; and it will setup below.
1 setter -(void)setAugust:(Month *)august
1 getter -(Month *)august
and 1 ivar _august
and when I implement my own setter, I have to _august = august (inside of
setter to assign the ivar with proper value)
2. Another question, some example shows: when I implement setter , they
use _ivar = ivar; and others use @synthesize _ivar = ivar;.
I believe @synthesize was used to create setter and getter but it's
abbreviated as of iOS 6, right? I am confused of using the statement while
implementing setter.
3. @property (nonatomic, getter=isPlan) BOOL plan;
What does "getter=" exactly mean?
No comments:
Post a Comment