I'm new to Objective-C and I have been working with simple programs, and I was wondering how you would synthesize an Objective-C object pointer. So if I had a simple header file like so:
//
// Rectangle.h
// Program 8
#import <Foundation/Foundation.h>
#import "XYPoint.h"
@interface Rectangle : NSObject
{
XYPoint *origin;
}
- (XYPoint *) origin; // getter
- (void) setOrigin: (XYPoint *)pt; // setter
@end
How do you synthesize the object pointer *origin
with @property
and @synthesize
?