ios - Dismissing UITableViewController changes ADBannerView location -
i have set adbannerview
in last of uitableviewcontroller
it's working when have same view, when go view , dismiss adview size changes.
here code
override func scrollviewdidscroll(scrollview: uiscrollview) { let tablebounds = tableview.bounds var bannerframe = self.bannerview.frame bannerframe = cgrect(x: tablebounds.origin.x, y: tablebounds.origin.y + cgrectgetheight(tablebounds) - cgrectgetheight(bannerframe), width: tablebounds.size.width, height: bannerframe.size.height) bannerview.frame = bannerframe }
before
after
try replacing
let tablebounds = tableview.bounds
with
let tablebounds = tableview.frame
Comments
Post a Comment