1

Just wondering how you are supposed to stretch the iAdBannerView across the full width of the Adaptive Layout Storyboard that exists in Xcode 6.

When I try and stretch it to the corners (so I can set auto layout values), it does allow it to be stretched.

Charlie S
  • 4,366
  • 6
  • 59
  • 97
  • Did you have constraints set? Constraints > frame, in that constraints will override frame change attempts – Aggressor Feb 18 '15 at 21:03

1 Answers1

2

Your ADBannerView will know which device it is on and set its dimensions correctly. You should just let auto layout know where you want the ad to be. For example, if you wanted the ADBannerView to be at the bottom of the screen then pin it to the bottom of the view with Bottom Space to: Bottom Layout Guide and align it to Align Center X to: Superview.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
  • Also if you want the banner at the bottom you should NOT add Leading and Trailing constraints to the banner or it will add a margin on left/right sides. – Marcos Reboucas Sep 11 '15 at 00:41
  • @MarcosReboucas You can add leading/trailing constraints but must set them to, `Leading Space to: Superview Equals: -16.0` and `Trailing Space to: Superview Equals: -16.0`. Its just not absolutely necessary. – Daniel Storm Sep 11 '15 at 00:49
  • That's right I mean it will add margins if you add these unnecessary constraints with zero values. – Marcos Reboucas Sep 11 '15 at 14:15