Objective C: Which is changed, property or ivar?
Posted
by
Wilhelmsen
on Stack Overflow
See other posts from Stack Overflow
or by Wilhelmsen
Published on 2012-06-08T09:58:27Z
Indexed on
2012/06/08
10:40 UTC
Read the original article
Hit count: 297
Worrying about duplicates but can not seem to find and answer I can understand in any of the other posts, I just have to ask:
When I have in my .h:
@interface SecondViewController : UIViewController{
NSString *changeName;
}
@property (readwrite, retain) NSString *changeName;
then in my .m
@synthesize changeName;
-(IBAction)changeButton:(id)sender{
changeName = @"changed";
}
Is it the synthesized property or the instance variable that get changed when I press "changeButton" ?
© Stack Overflow or respective owner