[英]tabbed application with adwhirl using storyboard
我已經用storyboard
標記了應用程序。 我想在我的adwhirl
下面adwhirl
。 雖然我定制我tabbar
點擊出在無法改變的TabBar的位置在初始階段任何item.I'm后。 我也希望我的所有tabbarviewcontrollers
是定制的尺寸,從而使應用程式內購買后adwhirl
將被刪除,整個tabbarviewcontoller
將再次調整為原始position.Any知道如何實現this.FYI我想擁有adwhirl
與iAd
與adMob
獲取Apple的iAdSuite ,然后查看TabbedBanner和SplitViewBanner。 您必須將兩者的某些效果結合起來。 SplitViewBanner將向您展示如何在BannerViewController內嵌入另一個view-controller,嵌套viewControllers。 我認為TabBarBanner代碼將廣告置於標簽欄的“上方”,但是您可以看到如何動態創建標簽欄控制器。 如果將這兩個概念結合起來,可能會得到所需的結果。
此外,盡管示例中的這些項目都是即時進行的,但我能夠在情節提要中創建splitViewController,然后將rootViewController重置為包含tabBarController的bannerViewController。
可能看起來像這樣(再次假設您已在情節提要中創建了tabBarController):
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;
// get BannerViewController from the SplitViewBanner of iAdSuite ;
// it should do the work of creating the space for your iAds only when necessary.
self.bannerViewController
= [[BannerViewController alloc] initWithContentViewController:tabBarController];
self.window.rootViewController = self.bannerViewController;
經過如此多的研究,我發現使用Adwhirl不可能做到這一點。 僅當我要將AdMob和iAd放在不同的位置時,才有可能這樣做。 而且由於我希望我的兩個廣告都在不同時間的同一個地方。 我無法以這種方式實現這一目標。 所以我以其他方式做到了。 在其中,我采取了額外的UIView。 當我不需要廣告時會添加。 並在需要時將其刪除。 而不是將其添加到選項卡下面。 我已經在標簽欄上方集成了廣告。 因此,我用一些針腳滿足了我的要求。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.