我想指出的是,自我是一個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