Bob Williams Bob Williams - 1 year ago 74
Swift Question

Making adMob position to bottom of screen Xcode/Swift

my BannerAd is currently at the top, how can I change its position to the bottom portrait?

var Banner = GADBannerView(adSize: kGADAdSizeSmartBannerPortrait)

var request:GADRequest = GADRequest()

override func viewDidLoad() {

func showBanner() {
Banner.hidden = false
Banner.adUnitID = "ca-app-pub-**************"
Banner.rootViewController = self
Banner.delegate = self

request.testDevices = [kGADSimulatorID];


what should i add?

Answer Source
Banner.frame = CGRect(x:0, y:self.view.frame.size.height - Banner.frame.size.height, width:Banner.frame.size.width, height:Banner.frame.size.height)