i’ve a problem. Serius problem. -.-” I’ve an app ViewBased, with MainView and FlipsideView. When i tap on the info button the FlipsideView will appears. But when i tap Done button, sometimes, the app terminates with “EXC_BAD_ACCESS” and i don’t know what i have to do!!! In the Flipside view i’ve also an iAd banner, managed by this code
- (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;
}
}
There’s something wrong?
Don’t call
[super viewDidLoad];twice.