我的GADBannerView
目前位于顶部,如何将其位置更改为底部?
var Banner = GADBannerView(adSize: kGADAdSizeSmartBannerPortrait)
var request:GADRequest = GADRequest()
override func viewDidLoad() {
super.viewDidLoad()
func showBanner() {
Banner.hidden = false
Banner.adUnitID = "ca-app-pub-**************"
Banner.rootViewController = self
Banner.delegate = self
self.view.addSubview(Banner)
Banner.loadRequest(request)
request.testDevices = [kGADSimulatorID];
}
}
我应该添加什么?
答案 0 :(得分:3)
Banner.frame = CGRect(x:0.0,
y:self.view.frame.size.height - Banner.frame.size.height,
width:Banner.frame.size.width,
height:Banner.frame.size.height)