Closing iAd Banner changes the view controller frame - iphone

I have a problem while showing an iAd banner. The small banner is placed at the bottom of the view, and when I click on it, it's shown in full screen, that's the normal behavior, but when I close it, it returns to its previous size, but the view controller appears moved, it appears with y = 0, so it appears under the status bar, but before opening the ad, it was placed below the status bar, I've tried to reset the banner's frame in the delegate method (void)bannerViewActionDidFinish:(ADBannerView *)banner but without success.
Anyone has faced this problem before?
Thank you very much!

Related

Part of UIButton area not firing func touchesBegan

The Area shown below of a UIButton is not registering touchsBegun but registering when touchesEnded ( which is calling also touchsBegun). In addition, the highlight state is not working in this area (again it works only on release but less evident). I have checked also the debug hierarchy but do not see anything strange (I am new to x-code and swift :)). The other part is working as expected. The button to the right works as expected
hierarchy view 1
hierarchy view 2 with tree view
The problem is the navigation bar. Hiding it has solved the issue. It appears that the navigation bar takes a few pixels from the left of the screen to enable back navigation with a swipe; this was covering the button.

adding subview problem

I am having the following problem while adding a subview to navigation controller. I even have tried to modify the Y location of frame before and after adding the subview but not effective.
Also tried to put a status bar on the child view but nothing is working.
Many Thanks.
You have a problem with a fullScreen IB checkbox or a fullscreen property set programmaticaly. Don't you call somewhere something like viewController.setStatusBarVisible = NO. Check it, I had the same problem.
EDIT : Does those questions / anwers help ?
iPhone - ModalViewController not raising to top of the screen
iPhone - displaying NavigationBar on a fullscreen modalView makes it go down with transparent space on top
Thank you very much everyone of you. I don't know what was the issue but instead of adding subview now I am using pushViewController and I am pushing the viewcontroller to the parent navigation controller. This solved the issue.
Thank you all of you once again.

Problem with ADBannerView in combination with UINavigationController

I have the following application:
I have 1 window. On that window I add two views. One view is the view of the UINavigationController. This is used to let the user navigate through my application. The other view has a ADBannerView on it. This view is placed on the bottom of the screen.
The user can navigate through my application without any problems and the ADBannerView keeps on the screen to show advertisements. But when the user clicks on the ADBannerView and close it again the banner is moved to the top of the screen and the UINavigationController views are not responding any more.
Anyone has any idea why this happens and how to resolve this issue?
I think this may be a bug in the iAdBanner view implementation. I had the same problem with my own app. When the banner expands to show the full ad, it changes it frame to fill the screen. Then when the ad is dismissed, it doesn't reset the full frame, meaning the ad banner is still occupying the entire screen, but only drawing in a small part of it.
Try implementing - (void)bannerViewActionDidFinish:(ADBannerView *)banner from the ADBannerViewDelegate protocol and adjusting the frame of the ad back to it's original size (usually 320 x 50).
I have raised this as a bug with Apple, but not gotten any response as yet. Feel free to duplicate it.

Hiding/Showing Status Bar

I'm developing an iPhone app that switches from a table view to a landscape fullscreen view (similar to the YouTube app). When it does so, I want to hide the status bar, then display it again when switching back to the table view. I'm using setStatusBarHidden but that just seems to hide the status bar wihout enlarging the screen area; there's still a blank bar where the status bar was. If set the hidden status bar property in Info.plist then I get the enlarged screen area but when the status bar displays it overlays the view.
How do I hide the status bar in such a way that the full screen is available to my view when it's hidden and only the screen under the status bar when it's displayed?
TIA.
Craig
PS: I copy/edit this question from app discussion. do not find good solution
http://discussions.apple.com/thread.jspa?threadID=1580662&start=15&tstart=0
Your view controller should have wantsFullScreenLayout set to YES, as well as hiding the status bar: See UIViewController reference.
If there is anyone looking for a solution where the above solution does not work (and there is still an annoying blue 20px gap at the top), try putting this in the viewWillAppear on the implementation file of the view controller that you would like the status bar to be hidden.
self.navigationController.navigationBar.frame = CGRectOffset(self.navigationController.navigationBar.frame, 0.0, -20.0);
That literally took me 12 hours or so to fix, and that was the solution, so now i'm spreading the word in case anyone else has this annoying issue.

Toolbar moves up when call finishes

While in a call, if the user wants to use my application, and if the call finishes, and the user is still in the application, the toolbar moves up, well all the view moves up, and so the toolbar now has a space in the bottom. Basically the height "Touch to return to call" has. I am using a toolbar and a navigation controller. The navigation controller moves fine, and everything in the view moves accordingly, the only problem is with the toolbar. So the question is, Is there an event, which is called after the call is finished, so I can set the frame again of my toolbar? I tried this delegate with no luck:
- (void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame
This one is called only when the toolbar is changing orientation.
alt text http://is.hn/downloads/IMG_0008.PNG
alt text http://is.hn/downloads/IMG_0009.PNG
Thanks.
In general setting your auto resize masks properly should fix things. Could you update with a screenshot to show exactly where the resizing issues are happening?