To address the getter method, use self.
:
NSLog(@"%@", self.foodName.stringValue);
Also, a minor point: group all your @property
declarations together at the start of the @interface
statement, but after any instance variable declarations:
@interface MyClass : NSObject {
NSString *_str1;
int _i1;
}
@property (weak) IBOutlet NSString *something;
@property (strong, readonly) NSNumber *somethingElse;
- (int)aMethod:(NSString *)string;
- (void)anotherMethod;
@end