我有一個問題。 Serius問題。 -.-''我有一個應用程序ViewBased,與MainView和FlipsideView。當我點擊信息按鈕FlipsideView將出現。但是,當我點擊完成按鈕,有時,應用程序終止與「EXC_BAD_ACCESS」,我不知道我必須做什麼!在不利的一面觀點我也一個iAd的橫幅,這個代碼iPhone - 問題與「EXC_BAD_ACCESS」
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
[textView setFont:[UIFont fontWithName:@"TrebuchetMS" size:12]];
adView=[[ADBannerView alloc] initWithFrame:CGRectMake(0.0f, 460.0f, 0.0f, 0.0f)];
adView.currentContentSizeIdentifier=ADBannerContentSizeIdentifierPortrait;
[self.view addSubview:adView];
self.adView.delegate=self;
self.bannerIsVisible=NO;
UIDevice *theDevice=[UIDevice currentDevice];
NSString *iOS;
iOS=theDevice.systemVersion;
float iOS2 = [iOS floatValue];
if (iOS2>=4.0) {
self.bannerIsVisible = NO;
}
[super viewDidLoad];
}
-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
if(!self.bannerIsVisible) {
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
banner.frame=CGRectOffset(banner.frame, 0, -50.0f);
[UIView commitAnimations];
self.bannerIsVisible=YES;
}
}
這裏有些不對勁管理?
你爲什麼要調用'[super viewDidLoad];'兩次? – visakh7 2011-03-07 12:17:06
我不知道O.O我誤會了:P我刪除了第一個[super viewDidLoad];並且所有的作品都很棒:D – 2011-03-07 12:23:07
然後接受幫助你的答案 – visakh7 2011-03-07 12:25:57