我第一次在我的应用程序中使用RevMobAds,使用的是以下代码:
[RevMobAds startSessionWithAppID:@" "];
[RevMobAds session].testingMode = RevMobAdsTestingModeWithAds;
[[RevMobAds session]hideBanner];
RevMobBannerView ad = [[RevMobAds session] bannerView];
ad.delegate = self;
[ad loadAd];
ad.frame=CGRectMake(00, 430, 320, 50);
[self.view addSubview:ad];`问题是在banner.Please help me中没有显示add。
发布于 2014-05-15 17:13:25
请这样尝试:
添加步骤:1 RevMovAds.framework。
导入步骤:2 In AppDelegate Method #import <RevMobAds/RevMobAds.h>
添加步骤:3 Delegate "RevMobAdsDelegate"
步骤:4在Prefix.pch中定义#define REVMOB_ID @"52f073fa09e95bbb02000761"
(在RevMobAds站点上创建帐户并为您的应用程序获取REVMOB_ID )
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[RevMobAds startSessionWithAppID:REVMOB_ID];
return YES;
}步骤:5声明方法
-(void)ForshowingFullScreenAds
{
RevMobFullscreen *fullscreen = [[RevMobAds session] fullscreen];
fullscreen.delegate = self;
[fullscreen loadAd];
[fullscreen showAd];
}步骤:6个 RevMobAdsDelegate方法
- (void)revmobAdDidReceive
{
NSLog(@"[RevMob Sample App] Ad loaded.");
}
- (void)revmobAdDidFailWithError:(NSError *)error
{
NSLog(@"[RevMob Sample App] Ad failed: %@", error);
}
- (void)revmobAdDisplayed {
NSLog(@"[RevMob Sample App] Ad displayed.");
}
- (void)revmobUserClosedTheAd {
NSLog(@"[RevMob Sample App] User clicked in the close button.");
}
- (void)revmobUserClickedInTheAd {
NSLog(@"[RevMob Sample App] User clicked in the Ad.");
}
- (void)installDidReceive {
NSLog(@"[RevMob Sample App] Install did receive.");
}
- (void)installDidFail {
NSLog(@"[RevMob Sample App] Install did fail.");
}步骤:7导入AppDelegate方法
步骤:8将这称为-(void)ViewDidLoad中的广告
AppController *App = (AppController *)[UIApplication sharedApplication].delegate;
[App ForshowingFullScreenAds];https://stackoverflow.com/questions/23672629
复制相似问题