开发者

error: expected member name or ';' after declaration specifiers [1] - IBAction

开发者 https://www.devze.com 2023-04-04 15:13 出处:网络
Ever since I\'ve upgraded to Xcode 4. I\'ve got this error and i can\'t seem to figure out whats wrong.

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

精彩评论

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

关注公众号