我想指出的是,自我是一个WelcomeViewController,它从UIViewController的继承:“self.canDisplayBannerAds = YES;”使应用程序在iOS 8上崩溃?
WelcomeViewController.h
#import <UIKit/UIKit.h>
@interface WelcomeViewController : UIViewController
@property (strong, nonatomic) NSString* score;
@property (strong, nonatomic) NSUserDefaults* preferences;
@end
WelcomeViewController.m
#import "WelcomeViewController.h"
#import "GESceneController.h"
#import <iAd/iAd.h>
@interface WelcomeViewController()
@property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
@property (weak, nonatomic) IBOutlet UILabel *highScoreLabel;
@end
@implementation WelcomeViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.canDisplayBannerAds = YES;
[self.scoreLabel setText:self.score];
NSString* highScoreText = [NSString stringWithFormat:@"Meilleur score : %ld",
[self.preferences integerForKey:@"highscore"]];
[self.highScoreLabel setText:highScoreText];
// Do any additional setup after loading the view.
}
和我获取错误:[WelcomeViewController setCanDisplayBannerAds:]:无法识别的选择器发送到实例0x7d97 f080
你问如何解决这个问题?或者指出一个错误?或者是什么?阅读SO常见问题原因我不认为这个问题在当前时间跟随它。 – 2014-11-03 19:00:00
你是对的,我编辑了主题并添加了一个问号。谢谢。 – acanterot 2014-11-04 12:20:16