开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜