【问题标题】:How to stick a iAddBanner above the tab bar and keep it there如何在标签栏上方粘贴 iAddBanner 并将其保留在那里
【发布时间】:2012-05-24 14:59:33
【问题描述】:

我正在尝试使用 iAddBanner,并将其放在标签栏的正上方。 这给我带来了一些问题,尤其是在表格视图中......

有没有人成功做到这一点?

干杯, 汤米

【问题讨论】:

    标签: iphone position storyboard tabbar


    【解决方案1】:

    我自己解决了这个问题。

    我最终将广告横幅添加为我的 tabbarcontroller 的子视图。

    - (void)bannerViewDidLoadAd:(ADBannerView *)banner
    {
        [iAdBanner setFrame:CGRectMake(0, 381, 200, 32)];
        [self.tabBarController.view addSubview:iAdBanner];
        //The inset is for the current tableview to get all the content on top of the adbanner
        UIEdgeInsets inset = UIEdgeInsetsMake(0, 0, 50, 0);
        self.tableView.contentInset = inset;
        adVisible = true;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-04
      • 1970-01-01
      • 2016-12-16
      • 2018-06-23
      • 2018-05-16
      • 1970-01-01
      • 2012-10-15
      相关资源
      最近更新 更多