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.
Related
I'm getting a little confused when it comes to UINavigationBar.
I set it up programatically and what it does is it pushes my viewController down (So things near the bottom of the view that are seen in storyboard are not seen after launching the app)
The question is - is there a way to tell my navigationbar not to push down my view but to sit on top of it instead?
I've been trying to use bounds and frame for this but it did not help.
Playing with self.navigationController?.navigationBar.translucent did not help neither.
In your storyboard, the attributes inspector for the problematic view controller. Disable adjust scroll view insets.
Think this is a bug on apple's part. It occurs very frequently for me.
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!
I am trying to show a modal view controller that hovers over another viewcontroller. Now the problem is when I use pushViewControllerAnimated the view controller that gets pushed will be as big as the whole iphone screen. I just want it to be half size of the screen.
How to adjust the size?
What exactly do you mean by half size of the screen?
If you are interested in the Facebook-like side menu, have a look at:
https://github.com/Inferis/ViewDeck
or https://github.com/BenHall/ios_facebook_style_navigation
If you are interested in an alertview-like small modal view controller, you might:
Consider using an alert view and adding some subviews
Read http://devblog.bu.mp/easy-partial-screen-modals-on-ios if you really have to use an UIViewController for that, which is not recommended by Apple (http://blog.carbonfive.com/2011/03/09/abusing-uiviewcontrollers/)
Hope this helps.
is there anyone knows a lib for creating a simple view that scroll down from the top of the screen for "Loading.." message?
Like http://github.com/matej/MBProgressHUD but the view should scroll down when begins to loading and scroll up when finish.
It might seem a little jarring to the user to scroll down and then back up. It shifts the users view of the data down and then back up without user interaction ...
I would simply overlay the loading view ...
Objective C: Adding Loading View to View Controllers
Check the code here: Simple Notifications for iPhone. Sorry for Russian, but the idea should be clear. You just need to add transition from the top of the page when notification label is shown.
I want to ask something about iAd's.
My main view controller include ADBannerViewDelegate and shows iAd banner correctly.
But I need to show iAd in all views
so should I transfer the same banner to all my view?
Or it is better to create a new iAd banner in IB for each view?
like here:
TempsReel *tempsReel = [[TempsReel alloc]initWithNibName:#"TempsReel" withBanner:adView];
[self.navigationController pushViewController:tempsReel animated:YES];
[tempsReel release];
Thanks for your help.
A UITabBarController or UINavigationController is by default going to take up the entire screen. What I did in my last app was just leave an iAd sized gap in my xibs for the view controllers inside the tab bar controller or nav controller.
In my application delegate, I create the iAd banner view and add it directly to the tab bar or nav controller's view.
iAdView.frame = CGRectMake(...);
[tabBarController.view addSubview:iAdView];
Then it'll be there all the time, regardless of what tab you are on or what level in the nav stack you are.
An additional note... I suggest checking out https://www.adwhirl.com/ They provide an easy to use system that will allow you to include ads from many different sources including iAd. Apple only fills like 10% of ad requests, so you are missing out on revenue for the remaining 90%.
You're not supposed to be showing more than one iAd banner at a time, or an iAd banner on screen with any other ad from another agency for that matter.
For apps with UITabBarControllers or UINavigationController as their main setup, I believe the iAd guidelines give advice on what you should do to keep a single ad banner onscreen at all times.
I would look into adding iAds either UIWindow or a UIView, either at the bottom or top, and then putting the tab bar or nav controller in the remainder of the screen.
I haven't done this myself but this is where I would start. Keep in mind that you won't have a banner displayed all the time so whatever else you have onscreen needs to resize appropriately.
If you have a main view that's viewed the majority of the time, I would just put a banner view there and forget about the rest if this seems like too much work.
Hope this helps.