Hello DaniWeb, i recently began reading a book called programming in Objective-c by Kochan 5th edition, One thing
i havent gotten the grasp on is Properties and WHEN to use them or if they are even usable on such a simple test program such as in a coffeeShop class for example.
for example:
@interface coffeeShop: NSObject
{
NSString *coffee;
NSString *icedCoffee;
}
// In my opinion, i believe that those Instance varibles (if they are) go below here as i put them.
@proiperty (strong, nonatomic) NSString *coffee;
@property (strong, nonatomic) NSString *icedCoffee;
@end
@implementation coffeeShop
// Can anyone explain how to correctly synthesize then and What exactly is SYNTHESIZE mean ?
@end
As i commented on the @implementation section, can anyone guide me on how to implement them the correct what and i've seen tutorial where people tend to put an Underscore (_) infront of the Name like NSString *_coffee;
in the @interface section and where as i dont get that.
One more thing, Can someone better explain the use of properties and why they may be great using them for iOS development ?
Thanks DaniWeb.