I have been following Apple’s “Your First Mac App” tutorial with Xcode 4.4 (4F250).
After creating an outlet for the slider, I cannot compile the app any more. There is the semantic issue: “Property implementation must have its declaration in interface.”
Similar questions on Stack Overflow seemed to be caused by wrong or missing @property declarations. However I have double- and triple-checked with the tutorial. The declaration reads:
@property (weak) IBOutlet NSSlider *slider;
I would appreciate any help because I am totally stuck. I believe I have been following the tutorial to the letter and yet things go wrong. That’s not a good way to get started. :-/
In case it matters, here is the complete code of the header and the implementation.
AppDelegate.h
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSSlider *slider;
- (IBAction)mute:(id)sender;
- (IBAction)takeFloatValueforVolumeFrom:(id)sender;
@end
AppDelegate.m
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize slider;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
}
- (IBAction)mute:(id)sender {
}
- (IBAction)takeFloatValueforVolumeFrom:(id)sender {
}
@end
It seems that my problem was just some hiccup on the part of Xcode. Today, I did just the same things, and everything worked out.
Thanks to everybody who tried to help me.