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

enter image description here

after

enter image description here

try replacing

let tablebounds = tableview.bounds 

with

let tablebounds = tableview.frame 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -