Hi,
I started learning Objective-C a few weeks ago. By doing a lot of tutorials I already understood the main purpose of properties in Objective-C, but there are a few things, which are not quiet clear yet.
First question would be when it's better to only use a property instead of using a property + an instance variable, which are named the same.
Secondly, why would you name instance variable + property differently and then assign them in the @synthesize - part,
e.g: @synthesize window = _window
Thanks,
Schnigges
I started learning Objective-C a few weeks ago. By doing a lot of tutorials I already understood the main purpose of properties in Objective-C, but there are a few things, which are not quiet clear yet.
First question would be when it's better to only use a property instead of using a property + an instance variable, which are named the same.
Secondly, why would you name instance variable + property differently and then assign them in the @synthesize - part,
e.g: @synthesize window = _window
Thanks,
Schnigges