iAd shown below UITabBarController, on screen all the time? - iphone

I'd like to add an iAd bannerView below a UITabBarController. Preferably, the actual Tab Bar would stay the same size, moving up and down with the banner view, and the views for each tab would be resized.
Is this possible or even allowed? If so, how would I go about doing this? Any tutorial links are appreciated.
If I had this setup, would I have resizing issues with the UINavigationControllers and their subviews?

Here is the technique I use, albeit for UINavigationController not UITabBarController. But I'm fairly certain you could make it work for a root UITabBarController.
global ADBannerView in iPhone app
While not mentioned in the SO question/answer, I do animate the ad appearing and disappearing, resizing the content view in the process. I've had no issues with this, and Apple's approved 3 apps with this code.

Related

Can the tab bar (using UITabBarController) go above iAds (or any banner ad)?

I have a tab bar app that I want to add a banner ad to. I have read another answer about how to add the ad, but it didn't talk about where. It seems the most obvious position would be between the tab bar and my content, but it seems a little disruptive to put the ad between two parts of my interface. I could also put it at the top of the screen, but there are reasons why I don't prefer to do that.
Is there a way I can move the tab bar up to make space for the ad?
Changing the frame of a tabbar controller's view is really painful.
I once considered doing it for some reason and found Adam's answer to Subclass UITabBarController to adjust it's frame very helpful.
But keep in mind that UITabBarController is doing a lot of magic behind (like resizing itself and its view controllers' views at different times) and that it may change with future versions of the OS.
Changing the default behavior of Apple's UI components can also be ground to AppStore rejections (so far I've never seen iAd banners put below the tab bar.)

How does one use one shared iAd banner using a Navigational Controller? iPhone/iPad

Basically I have an app that involves a navigation controller that moves between table views and scroll views. I wish to place iAds under the navigation bar but before the content of the page.
I assumed that in the mainwindow_iphone.xib I could just move down the view down from the navigation bar and have the app delegate handle the ads but apparently you cannot separate the navigational bar like this.
How would I go about implementing this? I would prefer to avoid having a separate banner load on each page.
If anyone needs anymore information from me, feel free to ask!
Thank you.

A simply question about iAd

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.

Show ToolBar over TabBar

In my app I would like to replace the TabBar with a ToolBar under certain conditions, similar to what happens in the Photos App when a user places it in selections mode (A toolbar with share copy, etc, buttons appear over the tab bar). How can I achieve this please?
This can be achieved by creating a new toolbar, assigning it an appropriate frame and adding it to self.tabBarController.view
I'm assuming your root view controller is a UITabBarController. Sometimes using the canned "Root" UIViewControllers is more of a hindrance than a help, especially if you want a highly custom look that does not fit into the paradigm of what the canned controllers offer. There's no reason you have to use them -- you could write your own, and do your own transition between your sub-UIViewController views onto the screen. You can use the UITabBar without the UITabBarController in your own custom UIViewController subclass, then you don't end up fighting the behavior of UITabBarController. Writing your own root ViewController can be very instructive as well -- you learn about all the things a root ViewController must do to manage the sub-ViewControllers.

Navigate to a SplitViewController

I've been playing around with the iPad SDK looking for ways to improve my current iPhone app. I've got a couple place where I think the new "SplitView" would look pretty good. My question is if it's possible to navigate to a "SplitView" with my current navigation based application? Mainly I'm not sure how to push that SplitViewController onto my current stack of views. Any thoughts?
It should always be the root controller according to Apple.
The split view controller’s view
should always be installed as the root
view of your application window. You
should never present a split view
inside of a navigation or tab bar
interface.
You can use a UISplitViewController in a UITabBarController without any problems. I have not attempted to push a UISplitViewController into an UINavigationController however.
(At least) with iOS 8 (which runs on any ipad except the first one) it's possible to use a "present modally"-segue to display a splitviewcontroller.
Drawback is that an existing navigation bar isn't displayed.
Check out the Multiple Detail Views sample app on Apple's Documentation, this could give you a good idea on how to deal with navigation structure and how to display views on the "splitViewController".