Take the tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I've been working on a mobile application for iOS platform. I was trying to put an ad banner in my app while I faced something ... I'd say strange.
I have a master-detail view workflow when the user selects an element from the master view detailed information is presented in a new view. The detail view is longer than the display so I've put a UIScrollView element that wraps all other elements - labels, text view and image.
The ad banner is placed out of the scroll view at the bottom of the screen so it is always on screen to the user.
Detail View with UI elements in a scroll view
So here goes my problem -
1. I scroll down the view
2. I click on the ad banner
3. I close the ad banner view hitting the Done button
Now all UI elements inside the scroll view had moved up (check the scrollbar on next images)
UI elements had moved up UI elements in the scroll view had moved up

I've been trying to locate the problem debugging the GADBannerViewDelegate method and I've found that in
- (void)adViewWillDismissScreen:(GADBannerView *)bannerView
everything is just fine and when the next method
- (void)adViewDidDismissScreen:(GADBannerView *)bannerView
is fired the UI elements had moved by a couple of hundred pixels up.

I hope I've been clear enough. Should I provide some source code?

P.P. This works the same way on the simulator and on my iPod touch 4th gen
Deployment Target of the project is 6.1
I use GoogleAdMobAdsSdkiOS version 6.4.2

share|improve this question
 
Are you doing anything in viewWillAppear? or any logic when the modal view of the ad is dismissed? –  RajPara Jun 17 at 20:55
 
Hello @RajPara, sorry for my delayed answer. I start to believe that my issue is in the way I use Autolayout - I've created a new project with a scroll view and a GABanner view and got the same issue. –  Mihail Velikov Jun 24 at 8:56
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.