2012-01-07 57 views
1

我收到的implentation最高分數線的預警下的代碼在這裏:不完整@implementation啓動畫面

#import <Twitter/Twitter.h> 
#import <GameKit/GameKit.h> 
#import <AVFoundation/AVAudioPlayer.h> 
#import <AudioToolbox/AudioServices.h> 

@interface Topscore() 

@property (strong, nonatomic) NSString *imageString; 
@property (strong, nonatomic) NSString *urlString; 
- (void)clearLabels; 
@end 

@implementation Topscore // Warning on this line 

@synthesize count, date, urlString = _urlString, imageString = _imageString, delegate, Topscore, currentLeaderBoard, earnedAchievementCache; 

完全執行

我startscreen.h頭文件看起來像代碼在這裏:

@interface Startscreen : UIViewController <AVAudioPlayerDelegate> { 

    AVAudioPlayer *audioPlayer; 

} 
- (IBAction)tweetTapped:(id)sender; 
- (IBAction) startgame; 

- (IBAction) showLeader; 

- (IBAction) subScore; 
- (IBAction) showLeader; 
- (IBAction) addScore; 
- (IBAction) settings; 

-(IBAction)playSound:(id)sender; 
-(IBAction)pause:(id)sender; 
-(IBAction)stopmusic; 



@end 

有誰知道什麼是錯的?

+0

你實施了哪些方法? – Mark 2012-01-07 22:04:32

回答

2

這只是意味着你沒有實現或定義你在頭文件中寫的所有方法。如果你在你的實現文件中定義了每個IBAction,這個錯誤將會消失。例如:

- (IBAction)tweetTapped:(id)sender { 
//Do whatever you want it do do here 
} 

總體而言,錯誤警告只是意味着您需要定義一切。因爲這只是一個警告,您的應用仍然會生成並運行。