2010-11-06 3 views
0

** Здравствуйте, я пытаюсь внедрить iAds в мое приложение, приложение преуспевает, а загрузка затем переходит на белый экран. Я работаю часами, чтобы попробовать, помощь Plz!Проблема подключения iAd?

Это мой код: **

.h:

@interface Vampire_Quiz_FinalViewController : UIViewController <ADBannerViewDelegate> 

{ 

ADBannerView *adView; 

BOOL bannerIsVisible; 

} 

@property (nonatomic,assign) BOOL bannerIsVisible; 

-(IBAction)V; 
-(IBAction)A; 
-(IBAction)I; 

@end 

.m:

@implementation Vampire_Quiz_FinalViewController 

- (IBAction)V; 

{ 

Vork *V = [[Vork alloc] initWithNibName:nil bundle:nil]; 

[self presentModalViewController:V animated:NO]; 

} 
- (IBAction)A; 

{ 

About *A = [[About alloc] initWithNibName:nil bundle:nil]; 

[self presentModalViewController:A animated:NO]; 

} 
- (IBAction)I; 

{ 

Instructions *I = [[Instructions alloc] initWithNibName:nil bundle:nil]; 

[self presentModalViewController:I animated:NO]; 

} 

- (void)dealloc { 
    [super dealloc]; 
} 

- (void)viewDidLoad { 

adView = [[ADBannerView alloc] initWithFrame:CGRectZero]; 

adView.frame = CGRectOffset(adView.frame, 0, -50); 

adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50]; 

adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50; 

[self.view addSubview:adView]; 

adView.delegate=self; 

self.bannerIsVisible=NO; 

[super viewDidLoad]; 

} 

@synthesize bannerIsVisible; 

- (void)bannerViewDidLoadAd:(ADBannerView *)banner 

{ 

if (!self.bannerIsVisible) 

{ 

    [UIView beginAnimations:@"animateAdBannerOn" context:NULL]; 

    // banner is invisible now and moved out of the screen on 50 px 

    banner.frame = CGRectOffset(banner.frame, 0, 50); 

    [UIView commitAnimations]; 

    self.bannerIsVisible = YES; 

} 

} 



- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error 

{ 

if (self.bannerIsVisible) 

{ 

    [UIView beginAnimations:@"animateAdBannerOff" context:NULL]; 

    // banner is visible and we move it out of the screen, due to connection issue 

    banner.frame = CGRectOffset(banner.frame, 0, -50); 

    [UIView commitAnimations]; 

    self.bannerIsVisible = NO; 

} 

} 



@end 

Я не думаю, что код является проблемой, мне кажется, что проблема с соединениями - это то, что у меня есть в построителе интерфейса! Это то, что я имею установку (теперь) в моих соединениях

Ссылки:

VIEW (http://postimage.org/image/2tp0d4zs4/)

ФАЙЛЫ ВЛАДЕЛЕЦ (Http: // postimage. орг/изображение/2toyplnac /)

AD VIEW CONTROLLER (http://postimage.org/image/2toveiyas/)

Спасибо!

+0

Retagged для вас в будущем, пожалуйста, помечать вопросы лучше –

ответ

Смежные вопросы