Subview shifting down 20 pixels when called in App

2019-07-14 02:10发布

I'm facing this issue when I'm calling AdMob ad with

[rootController.view addSubview:adMobAd]; //setup the ad

Upon returning from the ad being clicked the AdMob frame moves down 20 pixels. However it seems that this is not a AdMob issue, but a issue that is also discussed here: https://discussions.apple.com/thread/2288486

However I couldn't get it to work, any ideas?

1条回答
Root(大扎)
2楼-- · 2019-07-14 02:36

20 pixels is the height of the status bar. If the app will don't use the status bar make sure all the XIB files you are using has the status bar turned off. You may also include in the Info.plist the UIStatusBarHidden property and set it to YES.

查看更多
登录 后发表回答