在导航栏上显示iAdBanner

时间:2012-09-05 13:25:07

标签: iphone iad

我想在导航栏上显示iAd Banner。

我尝试使用以下代码

Devanagari *viewController = [[Devanagari alloc]init];
viewController.delegate = self;

// _adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0, 0, 320,40)];
  _adView.frame = CGRectOffset(_adView.frame, 0, -50);
_adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
_adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
_adView.delegate=self;
self.bannerIsVisible=YES;

UINavigationController *navigationController = [[UINavigationController alloc]
                                                        initWithRootViewController:viewController];
navigationController.navigationBar.tintColor = [UIColor brownColor];
[self presentModalViewController:navigationController animated:YES];
[navigationController release];

没用。

有什么方法可以在视图顶部然后在导航栏下面显示iAdBanner View。

感谢您的帮助。

0 个答案:

没有答案
相关问题