user3036705
user3036705

Reputation: 3

iAd Banner disappearing on 3.5", but shows on 4" screen?

I am doing a simple one view layout, calculator style app. I have multiple input fields, where values are entered, and a calculate button. All this works well. When I change size to 3.5" screen, the iAd banner I have at the bottom of screen disappears. When I switch back to 4", the banner is back. How do I lock down the banner to display at bottom of screen regardless of screen size? Thanks~

Upvotes: 0

Views: 444

Answers (2)

siburb
siburb

Reputation: 5017

Hopefully you're using Autolayout. It takes a while to understand, but when you do it is extremely powerful for laying out flexibly for multiple screen sizes.

Anyway, assuming you are using Autolayout:

Here's my ViewController with the banner ad at the bottom Here's my ViewController with the banner ad at the bottom

I select the banner and then click "Pin" - I then add the constraints that you can see in the image - click "Add Constraints".

I select the banner and then click "Pin" - I then add the constraints that you can see in the image, and click "Add Constraints"

Now, if I view how it would look on a 3.5" screen, it is still fixed to the bottom.

Now, if I view how it would look on a 3.5" screen, it is still fixed to the bottom.

Upvotes: 1

scollaco
scollaco

Reputation: 922

This can be happening because the Autolayout. Go to Storyboard, select the iAd view, then click on the segment "Pin" (third button on the bottom of Storyboard) and add the bottom Constrain.

Hope it helps.

Upvotes: 0

Related Questions