I'm trying to integrate iAds to iPhone app. It makes me very confusing.
my app got many view controllers with uitableviews.
Should I integrate iAds at every view controller or
should I add it in mainwindow.xib (i add iAds codes to AppDelegate.h .m) or
should I create iAdsViewcontroller.h .m & .xib?
if I add iAds to mianwindow.xib, how do i handle delegates like bannerViewDidLoadAd (need to resize uitableview according to bannerview is visibie or not).
If i integrate at every view controller, banner would be switching along with the app views. I read somewhere if the app doesn't show an Ad for at least 30 seconds, it will lose ecpm.
Any thoughts will be appreciated... =)
Apple iAd Documentation Best Practices
Related
I want to displaying my own ads in my applications. Acutally the ads banner are static images which are loaded after some delay. Is iad network should be enable for that the app which display these iads. Because i does not want to load iads from the apple.
No. iAd is only for displaying ads from the Apple iAd network using an ADBannerView in your app. If you are just presenting the user a banner image that you have created then no matter what it does you don't need to touch or worry about anything to do with iAd.
From Apple's Documentation:
The ADBannerView class provides a self-contained view. Your
application should not subclass ADBannerView, nor should your
application attempt to change the behavior of the banner view. For
example, your application should never add subviews to a banner view.
If you are using an ADBannerview for anything other than displaying iAds from Apple you're doing it wrong. It seems like you want to display your own ads which are static images. The correct class to use for this is UIImageView. If you display your own images using an ADBannerView you will get rejected from the App Store.
Today I finished my project and wanted to upload it to the AppStore. Now I want to implement iAd.
I have 4 views in my application and switch via
[self presentModalViewController:eas animated:YES];
between them. I want to show an iAd banner in all of them. I found shared iAd on the internet but it just works with navigationcontrollers or tab bars. Is there another option of me to implement iAd in every view?
Cheers
V. Lietz.
You can create a subclass of UIViewController which sets up the iAd and use it for your viewcontrollers.
The better way to do this (to avoid subclassing which locks you into using that subclass) would probably be to create a category for UIViewController that sets up the iAd and just use that.
I have seen some tutorials about iphone development, but they're before ARC and before storyboard it seems.
The guy creates a switch that will switch between two views.
A class with a blue background, and a class with a red background.
How would you do this in IOS5 with storyboard?
I've heard about segues, but they get a 'back' button, which the guy in the tutorial didnt get - he simply changed between views my tapping the switch/button.
You better go through this tutorials to understand how to develop app in IOS 5. The tutorials, which you have already seen are for ios4 and prior to it. Also you can use those in IOS 5 too. But Storyboard is much easier than XIB.
http://www.techotopia.com/index.php/IPhone_iOS_5_Development_Essentials
http://www.techotopia.com/index.php/Using_Xcode_Storyboarding_%28iPhone_iOS_5%29
Anyway #dew given you the correct answer.
You need to add 2 View Controllers into your storyboard and then embed in navigation controller. After you create some button in one view, you just gotta ctrl-drag it to the other view and select push, that should do it. Or simply chech out this tutorial http://maybelost.com/2011/10/tutorial-storyboard-in-xcode-4-2-with-navigation-controller-and-tabbar-controller-part1/ :)
I would highly suggest watching the first 2 or 3 lectures of Stanford's CS193P introductory iPhone programming course. It's free and will start you off on the right foot. It's also targeted for iOS5 and Xcode 4. Check it out at:
http://itunes.apple.com/itunes-u/ipad-iphone-application-development/id473757255
To answer your question, moving between view controllers is usually done using a container controller or pushing view controllers 'modally'. I would suggest reading the View Controller Programming Guide put out by apple for an overview of how these things work.
In iOS5 you can use storyboards to set-up segues (as you suggested). They don't always 'give you a back' button, only when you segue between view controllers within a navigation controller. You can have a button push a view controller onto a screen by setting up target-action.
Again, the iTunesU lectures will cover all this. Check it out!
I want to implement a Newsstand App and I have seen that almost Newsstand App have the same background for the Library, the first screen of the app, same xib, but with their own covers for their magazine. It this xib available somewhere so that I could also use it?
Thanks!
No. You need to implement your own view controller.
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.