error: expected member name or ';' after declaration specifiers [1] - IBAction
Ever since I've upgraded to Xcode 4. I've got this error and i can't seem to figure out whats wrong.
error: expected member name or ';' after declaration specifiers [1]
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
@interface SixViewController : UIViewController <AVAudioPlayerDelegate> {
IBOutlet UIImageView *play;
AVAudioPlayer *theAudio;
float progress;
NSTimer *timer;
开发者_如何学C IBOutlet UIProgressView *progressView;
int mainInt;
IBAction *timeOut;
}
It highlights the error on ibaction line
thanks
IBAction
is intended as a return value for methods:
- (IBAction)someMethod;
... to tell Interface Builder that it is available for target/action connections. It is not intended as a variable data type, although you can get away with it when IBAction
is defined as void
.
However, you should use the correct data type for this variable, e.g. id
for generic objects or maybe NSTimeInterval
depending on what you're actually trying to do here.
精彩评论