0

私は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];`

問題は、バナーに追加が表示されないことです。助けてください。

4

1 に答える 1

4

このようにしてみてください:

ステップ:1 RevMovAds.framework を追加します。

Step:2インAppDelegateメソッドインポート#import <RevMobAds/RevMobAds.h>

Step:3Delegateメソッドを追加"RevMobAdsDelegate"

Step:4#define REVMOB_ID @"52f073fa09e95bbb02000761" Prefix.pchで定義

(RevMobAds サイトでアカウントを作成し、アプリケーションの REVMOB_ID を取得します)

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [RevMobAds startSessionWithAppID:REVMOB_ID];
  return YES;
}

Step: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.");
}

Step:7インポートAppDelegate方法

ステップ:8この広告を呼び出します-(void)ViewDidLoad

  AppController *App = (AppController *)[UIApplication sharedApplication].delegate;
  [App ForshowingFullScreenAds];
于 2014-05-15T09:13:24.957 に答える