Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jandrad/AdRootViewController
RootViewController replacement for Cocos2d that supports iAds and AdMob.
https://github.com/jandrad/AdRootViewController
Last synced: about 1 month ago
JSON representation
RootViewController replacement for Cocos2d that supports iAds and AdMob.
- Host: GitHub
- URL: https://github.com/jandrad/AdRootViewController
- Owner: jandrad
- License: other
- Created: 2011-02-08T06:41:32.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-10-16T02:03:56.000Z (about 13 years ago)
- Last Synced: 2023-03-12T03:22:26.850Z (almost 2 years ago)
- Language: Objective-C
- Homepage:
- Size: 5.75 MB
- Stars: 44
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE.cocos2d
Awesome Lists containing this project
- awesome - AdRootViewController - RootViewController replacement for Cocos2d that supports iAds and AdMob. (etc)
- awesome - AdRootViewController - RootViewController replacement for Cocos2d that supports iAds and AdMob. (etc)
README
AdRootViewController
==================RootViewController replacement for Cocos2d that supports iAds and AdMob.
Features
-------------* Two Positions to set the Ads (Top, or Bottom)
* Autorotation support, using CCDirector or UIViewController
* Universal support (iPhone + iPad)
* Interstitial ads (AdMob Only)
* Easy to useUsage
-----------------------Replace the RootViewController in the Cocos2d project with the AdRootViewController.
Define your AdMob publisher Id
#define ADMOB_PUBLISHER_ID @"your_publisher_id"
To add the ad to the controller's view call:
[viewController addBannerAd];
To remove the ad call:
[viewController removeBannerAd];
Interstitial Ads are shown calling:
[viewController addInterstitialAd];
You can set the position of the ad at the Top or Bottom of the Screen, just call:
[viewController setAdBannerPosition:kAdBannerPositionBottom]
or
[viewController setAdBannerPosition:kAdBannerPositionTop]
Hope it helps, suggestions and corrections are always welcome.