iphone - 不完整的@implementation Startscreen

标签 iphone objective-c ios cocoa-touch

我在此处代码中的实现 Topscore 行收到警告:

#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;

Incomplete implementation

我的 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

有人知道怎么回事吗?

最佳答案

这只是意味着您还没有实现或定义您在头文件中编写的所有方法。如果您在实现文件中定义了每个 IBAction,这个错误就会消失。例如:

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

总的来说,错误警告只是意味着你需要定义一切。因为这只是一个警告,所以您的应用仍会构建并运行。

关于iphone - 不完整的@implementation Startscreen,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8773461/

相关文章:

ios - 带内账号注册后是什么

ios - 如何从 iTunes Connect 中删除未经批准的应用程序?

iphone - 创建 iOS Facebook SDK 静态库

iphone - Debug模式和断点的 Xcode 问题

objective-c - 有没有办法删除日期选择器的 "year"?

ios - UIView 和动画没有出现

iphone - 执行 block 并等待 : to save a root managed object context synchronously doesn't provide non temporary Object IDs

iphone - 如何调用 heightForRowAtIndexPath 的默认实现?

iphone - 在 iPhone 上播放背景音频

ios - Realm 未正确删除