Я пытаюсь добавить iAd в мое приложение на основе вкладок, которое настраивается с помощью раскадровки. Я следую примеру TabbedBanner в примере кода iAdSuite из apple. Я импортировал BannerViewController и установили следующее:iAd в UITabBarController с раскадровки
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UITabBarController* tabBarController = (id)self.window.rootViewController;
CGRect tabBarViewFrame = tabBarController.view.frame;
tabBarViewFrame.origin.y -= application.statusBarFrame.size.height;
tabBarViewFrame.size.height += application.statusBarFrame.size.height;
tabBarController.view.frame = tabBarViewFrame;
self.window.rootViewController = [[BannerViewController alloc] initWithContentViewController:tabBarController];
}
Я добавил следующее к моему SummaryViewController
- (void)viewDidLoad
{
[super viewDidLoad];
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willBeginBannerViewActionNotification:) name:BannerViewActionWillBegin object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didFinishBannerViewActionNotification:) name:BannerViewActionDidFinish object:nil];
}
Объявление в данный момент отображается ниже панели вкладок? Кроме того, содержание моего взгляда исчезло.