How to position banner ads over UITabbar?

前端 未结 1 732
旧巷少年郎
旧巷少年郎 2021-02-11 09:33

I want to use ads in my application. I added a tab bar as shown below. I would like the advertisement to appear right above the tab bar.

To do this I added the ban

1条回答
  •  隐瞒了意图╮
    2021-02-11 10:23

    I solved the problem by positioning the ad with CGRectMake().

    googleBannerView.frame = CGRectMake(0, (view.bounds.height - googleBannerView.frame.size.height) - 49, self.view.bounds.size.width, 49)
    

    49 is the height of UITabBar.

    0 讨论(0)
提交回复
热议问题