“穿山甲廣告” 的使用:開屏、banner、激勵廣告等

穿山甲廣告:官方網(wǎng)站文檔

穿山甲及廣告位ID創(chuàng)建穿山甲應用和廣告位

我公司之前使用的是廣點通廣告骤宣,但是在點擊變現(xiàn)時,穿山甲變現(xiàn)的更多序愚,所以公司要求在我們項目中接入穿山甲替換掉原來的廣點通 被环,
下面就是我在網(wǎng)上找到的iOS APP接入穿山甲文檔:

Podfile文件:

#(穿山甲.廣告)
#SDK版本 >=3.4.0.0
pod 'Ads-CN' # (4.0.0.5)
#SDK版本 <3.4.0.0
pod 'Bytedance-UnionAD' #  (3.3.6.2)

相關鏈接:
CocosCreator接入穿山甲SDK(IOS)--激勵視屏
Creator iOS接入穿山甲SDK
首先介紹一下

.m文件與.mm文件有什么區(qū)別
.m文件 支持C ,OC
.mm文件 支持C,C++,OC

OC 與 TS 互調(diào)贩耐,例子有很多,比如官方的例子里面就有
TS 調(diào)用OC的時候有個點 初學者可能有點懵

//錯誤示例
//oc中代碼  微信分享圖片 
+(void) wxShareImage:(NSString*) filepath : (NSString*) title : (const int) target
{

}
//上述寫法在OC中并不報錯 但是在TS中我們調(diào)用OC代碼時就會出現(xiàn)參數(shù)錯誤的問題
//TS代碼調(diào)用
jsb.reflection.callStaticMethod("AppController","wxShareImage:",filePath,title,target);


//正確示例
+(void) wxShareImage:(NSString*) filepath titleStr : (NSString*) title targetInter : (const int) target
{
    
}
//你可能會想什么是titleStr 字符串 targetInter 整型,其實它的可選字符串可以幫助我們閱讀和理解方法聪蘸,尤其是當方法被調(diào)用的時候菇晃。
//這兩個字段就是代表可選字段,用來幫助我們理解的仔粥,OC代碼記得寫上示姿,并與JS代碼配合好就可以了
//TS代碼調(diào)用
jsb.reflection.callStaticMethod("AppController","wxShareImage:titleStr:targetInter:",filePath,title,target);
//無參示范
jsb.reflection.callStaticMethod("AppController","wxShareImage");
//一個參數(shù)示范
jsb.reflection.callStaticMethod("AppController","wxShareImage:","參數(shù)1");

下面開始接入穿山甲SDK
然后先根據(jù)官方文檔配置環(huán)境
假設出現(xiàn)庫引入了,但是代碼不出提示桐早,或者報錯癣缅,可以點擊Finder --> 前往 -->按住options 點擊出現(xiàn)的隱藏文件資源庫 --> Developer -->xcode
清除掉里面的緩存文件夾,關閉xcode,再次打開勘畔,如果還是報錯所灸,自行檢查了

注意:在使用cocoapods導入SDK時,`Bytedance-UnionAD

我導入了好幾次炫七,其中幾次都是因為從github`下載文件太大爬立,而導致錯誤,好在最后導入進去了万哪。遇到同樣問題的童鞋~可以多試幾次侠驯。

穿山甲SDK初始化

    //在AppController.mm文件中的didFinishLaunchingWithOptions方法中調(diào)用
    //穿山甲SDK初始化
    [BUAdSDKManager setAppID:@"應用ID"];
    [BUAdSDKManager setLoglevel:BUAdSDKLogLevelDebug];
    [BUAdSDKManager setIsPaidApp:NO];

1.激勵視頻廣告

//TTRewardVideoAd.h頭文件
@interface TTRewardVideoAd : UIViewController
{
    
}

+(TTRewardVideoAd*) getInstance;
-(void) ShowRewardVideoAd:(NSString *) adId;


@end
//
//  TTRewardVideoAd.mm
//
//
//  Created by Jaymz on 2020/7/18.
//
#import "TTRewardVideoAd.h"
#import <Foundation/Foundation.h>
#import <BUAdSDK/BUAdSDKManager.h>
#import <BUAdSDK/BUNativeExpressRewardedVideoAd.h>
#import <BUAdSDK/BURewardedVideoModel.h>
#import "CallJS.h" 
//CallJS.h 這個是我自己封裝的調(diào)用JS的類

@interface TTRewardVideoAd()<BUNativeExpressRewardedVideoAdDelegate>
@property (nonatomic, strong) BUNativeExpressRewardedVideoAd *rewardedVideoAd;
@end

static TTRewardVideoAd* m_instance;
@implementation TTRewardVideoAd

    
-(void)viewDidLoad
{
    [super viewDidLoad];
    m_instance = self;
    NSLog(@"viewDidLoad");
}

+(TTRewardVideoAd*) getInstance
{
    if (m_instance == NULL)
    {
        NSLog(@"獲取m_instance失敗");
    }
    return m_instance;
}

//拉起視頻廣告
-(void) ShowRewardVideoAd:(NSString *)slotID
{
    slotID = @"xxxxxx";  //廣告ID
    NSLog(@"ShowRewardVideoAd Call !!!");
    BURewardedVideoModel *model = [[BURewardedVideoModel alloc] init];
    model.userId = @"jaymz";
    self.rewardedVideoAd = [[BUNativeExpressRewardedVideoAd alloc] initWithSlotID:slotID rewardedVideoModel:model];
    self.rewardedVideoAd.delegate = self;
    [self.rewardedVideoAd loadAdData];
    NSLog(@"ShowRewardVideoAd over!!");
}

//需要獲取到顯示在最上面的viewController
- (UIViewController *)theTopviewControler{
    //獲取根控制器
    UIViewController *rootVC = [[UIApplication sharedApplication].delegate window].rootViewController;
    
    UIViewController *parent = rootVC;
    //遍歷 如果是presentViewController
    while ((parent = rootVC.presentedViewController) != nil ) {
        rootVC = parent;
    }
   
    while ([rootVC isKindOfClass:[UINavigationController class]]) {
        rootVC = [(UINavigationController *)rootVC topViewController];
    }
    return rootVC;
}

-(void) showRewardVideoAd
{
    NSLog(@"展示獎勵視頻廣告");
    if(self.rewardedVideoAd.isAdValid)
    {
       [self.rewardedVideoAd showAdFromRootViewController:[self theTopviewControler]];
    }
}

#pragma mark - BUNativeExpressRewardedVideoAdDelegate
//加載廣告的時候,delegate 傳的是self奕巍,廣告事件發(fā)生后會自動回調(diào)回來吟策,我們只需要重新實現(xiàn)這些方法即可
- (void)nativeExpressRewardedVideoAdDidLoad:
(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
    [self showRewardVideoAd]; //記載完畢的回調(diào),在這里做顯示
}

- (void)nativeExpressRewardedVideoAd:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error {
    NSLog(@"%s",__func__);
    NSLog(@"error code : %ld , error message : %@",(long)error.code,error.description);
}

- (void)nativeExpressRewardedVideoAdCallback:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd withType:(BUNativeExpressRewardedVideoAdType)nativeExpressVideoType{
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdDidDownLoadVideo:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdViewRenderSuccess:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdViewRenderFail:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd error:(NSError *_Nullable)error {
    NSLog(@"%s",__func__);
    NSLog(@"視頻廣告渲染錯誤");
    [CallJS callJsEngineCallBack:@"window.AdMrg.VideoAdFail":@"廣告播放錯誤"];
}

- (void)nativeExpressRewardedVideoAdWillVisible:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdDidVisible:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdWillClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdDidClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
    NSLog(@"看完廣告返回 發(fā)放獎勵");
    [CallJS callJsEngineCallBack:@"window.AdMrg.VideoAdFinish":@""];
}

- (void)nativeExpressRewardedVideoAdDidClick:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
    NSLog(@"加載激勵視頻錯誤");
    [CallJS callJsEngineCallBack:@"window.AdMrg.VideoAdFail":@"廣告播放錯誤"];
}

- (void)nativeExpressRewardedVideoAdDidClickSkip:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdDidPlayFinish:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdServerRewardDidSucceed:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd verify:(BOOL)verify {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdServerRewardDidFail:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressRewardedVideoAdDidCloseOtherController:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd interactionType:(BUInteractionType)interactionType {
    NSString *str = nil;
    if (interactionType == BUInteractionTypePage) {
        str = @"ladingpage";
    } else if (interactionType == BUInteractionTypeVideoAdDetail) {
        str = @"videoDetail";
    } else {
        str = @"appstoreInApp";
    }
    NSLog(@"%s __ %@",__func__,str);
}

@end

添加上述代碼后 還需要在AppController.mm的didFinishLaunchingWithOptions方法中添加
(后續(xù)所有廣告都要這樣操作的止,這里只寫這個典型了)

    //記得在初始化SDK之后檩坚,_viewController初始化之后
    UIViewController *rewardVideoAd = [[TTRewardVideoAd alloc] init];
    [_viewController.view addSubview:rewardVideoAd.view];

2.插屏廣告

//插屏廣告(非信息流形式,采用模版渲染)
//
//  TTExpressInsertAd.h
//  
//
//  Created by Jaymz on 2020/7/18.
//

@interface TTExpressInsertAd : UIViewController
{
    
}

+(TTExpressInsertAd*) getInstance;
-(void) ShowExpressInsertAd:(NSString *) adId;
@end
//
//  TTExpressInsertAd.mm
//
//  Created by Jaymz on 2020/7/23.
//

#import <Foundation/Foundation.h>
#import "TTExpressInsertAd.h"
#import <BUAdSDK/BUNativeExpressInterstitialAd.h>


@interface TTExpressInsertAd()<BUNativeExpresInterstitialAdDelegate>
@property (nonatomic, strong) BUNativeExpressInterstitialAd *interstitialAd;
@end

static TTExpressInsertAd* m_instance;

@implementation TTExpressInsertAd

-(void)viewDidLoad
{
    [super viewDidLoad];
    m_instance = self;
    NSLog(@"viewDidLoad");
}

- (void)viewWillLayoutSubviews
{
    [super viewWillLayoutSubviews];
}

+(TTExpressInsertAd*) getInstance
{
    return m_instance;
}

-(void) ShowExpressInsertAd:(NSString *) slotID
{
    slotID = @"945341872";//945341872
    NSLog(@"ShowExpressInsertAd!!");
    //NSValue *sizeValue = [self.sizeDict objectForKey:slotID];
    CGSize size = CGSizeMake(300, 450);
    CGFloat width = CGRectGetWidth([UIScreen mainScreen].bounds)-40;
    CGFloat height = width/size.width*size.height;
    NSLog(@"width : %f  height : %f",width,height);
    //#warning 升級的用戶請注意诅福,初始化方法去掉了imgSize參數(shù)
    self.interstitialAd = [[BUNativeExpressInterstitialAd alloc] initWithSlotID:slotID adSize:CGSizeMake(width, height)];
    self.interstitialAd.delegate = self;
    [self.interstitialAd loadAdData];
}

- (void)showInterstitial
{
    NSLog(@"showIntersitial call %d",self.interstitialAd.adValid);
    if (self.interstitialAd)
    {
        NSLog(@"展示插屏廣告 showInterstitial");
        [self.interstitialAd showAdFromRootViewController:[self theTopviewControler]];
    }
}

- (UIViewController *)theTopviewControler{
    //獲取根控制器
    UIViewController *rootVC = [[UIApplication sharedApplication].delegate window].rootViewController;
    
    UIViewController *parent = rootVC;
    //遍歷 如果是presentViewController
    while ((parent = rootVC.presentedViewController) != nil ) {
        rootVC = parent;
    }
   
    while ([rootVC isKindOfClass:[UINavigationController class]]) {
        rootVC = [(UINavigationController *)rootVC topViewController];
    }
    return rootVC;
}

#pragma ---BUNativeExpresInterstitialAdDelegate
- (void)nativeExpresInterstitialAdDidLoad:(BUNativeExpressInterstitialAd *)interstitialAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpresInterstitialAd:(BUNativeExpressInterstitialAd *)interstitialAd didFailWithError:(NSError *)error {
    NSLog(@"%s",__func__);
}

- (void)nativeExpresInterstitialAdRenderSuccess:(BUNativeExpressInterstitialAd *)interstitialAd {
    NSLog(@"%s",__func__);
    [self showInterstitial];
    //這個插屏廣告不能放在加載完畢中匾委,加載完畢廣告組件adValid = 0,問了官方才知道要在這里加,文檔上跟demo里都是在加載回調(diào)氓润,坑
}

- (void)nativeExpresInterstitialAdRenderFail:(BUNativeExpressInterstitialAd *)interstitialAd error:(NSError *)error {
    NSLog(@"%s",__func__);
    NSLog(@"error code : %ld , error message : %@",(long)error.code,error.description);
}

- (void)nativeExpresInterstitialAdWillVisible:(BUNativeExpressInterstitialAd *)interstitialAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpresInterstitialAdDidClick:(BUNativeExpressInterstitialAd *)interstitialAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpresInterstitialAdWillClose:(BUNativeExpressInterstitialAd *)interstitialAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpresInterstitialAdDidClose:(BUNativeExpressInterstitialAd *)interstitialAd {
    NSLog(@"%s",__func__);
}

- (void)nativeExpresInterstitialAdDidCloseOtherController:(BUNativeExpressInterstitialAd *)interstitialAd interactionType:(BUInteractionType)interactionType {
    NSString *str = nil;
    if (interactionType == BUInteractionTypePage) {
        str = @"ladingpage";
    } else if (interactionType == BUInteractionTypeVideoAdDetail) {
        str = @"videoDetail";
    } else {
        str = @"appstoreInApp";
    }
    NSLog(@"%s __ %@",__func__,str);
}

@end

3.Banner廣告

//
//  TTBannerAd.h
//
//  Created by Jaymz on 2020/7/24.


@interface TTBannerAd : UIViewController
{
    
}

+(TTBannerAd*) getInstance;
-(void) ShowBannerAd:(NSString *) adId;
-(void) HideBannerAd;

@end
//
//  TTBannerAd.mm
//
//  Created by Jaymz on 2020/7/24.
//

#import <Foundation/Foundation.h>
#import "TTBannerAd.h"
#import <BUAdSDK/BUNativeExpressBannerView.h>

@interface TTBannerAd()<BUNativeExpressBannerViewDelegate>
@property (nonatomic, strong) BUNativeExpressBannerView *bannerView;
@end

static TTBannerAd* m_instance;

@implementation TTBannerAd

+(TTBannerAd*) getInstance
{
    return m_instance;
}

-(void) viewDidLoad
{
    [super viewDidLoad];
    m_instance = self;
    NSLog(@"BannerViewDidLoad");
}

-(void) ShowBannerAd:(NSString *)slotID
{
    NSLog(@"展示bannerAd");
    slotID = @"945344475";
    [self.bannerView removeFromSuperview];
    CGSize size = CGSizeMake(600,150);
    CGFloat screenWidth = CGRectGetWidth([UIScreen mainScreen].bounds);
    CGFloat bannerHeigh = screenWidth/size.width*size.height;//banner按縮放比例變化
    BOOL isOpenRotate = NO; //是否輪轉(zhuǎn) 如果開啟后30s后會自動再次加載banner,不做限制的話赂乐,會出現(xiàn)bannerAd已經(jīng)被關閉,但是又被加載出來
    CGFloat screenHeight = CGRectGetHeight([UIScreen mainScreen].bounds);//獲取到屏幕高度
    #warning 升級的用戶請注意咖气,初始化方法去掉了imgSize參數(shù)
    if (isOpenRotate)
    {
        self.bannerView = [[BUNativeExpressBannerView alloc] initWithSlotID:slotID rootViewController:self adSize:CGSizeMake(screenWidth, bannerHeigh) IsSupportDeepLink:YES interval:30]; //設置間隔30s?
    } else {
        self.bannerView = [[BUNativeExpressBannerView alloc] initWithSlotID:slotID rootViewController:self adSize:CGSizeMake(screenWidth, bannerHeigh) IsSupportDeepLink:YES];
    }
    self.bannerView.frame = CGRectMake(0, screenHeight - bannerHeigh - 10, screenWidth, bannerHeigh);
    //self.bannerView.frame = CGRectMake(0, 10, screenWidth, bannerHeigh);
    self.bannerView.delegate = self;
    [self.bannerView loadAdData];
}

-(void) showBanner
{
    NSLog(@"加載banner完成挨措,開始展示");
    [self.view addSubview:self.bannerView];
}

-(void) HideBannerAd
{
    NSLog(@"關閉BannerAd");
    [self.bannerView removeFromSuperview]; //字面意思像刪除操作
}

- (UIViewController *)theTopviewControler{
    //獲取根控制器
    UIViewController *rootVC = [[UIApplication sharedApplication].delegate window].rootViewController;
    
    UIViewController *parent = rootVC;
    //遍歷 如果是presentViewController
    while ((parent = rootVC.presentedViewController) != nil ) {
        rootVC = parent;
    }
   
    while ([rootVC isKindOfClass:[UINavigationController class]]) {
        rootVC = [(UINavigationController *)rootVC topViewController];
    }
    return rootVC;
}

#pragma BUNativeExpressBannerViewDelegate
- (void)nativeExpressBannerAdViewDidLoad:(BUNativeExpressBannerView *)bannerAdView {
    NSLog(@"%s",__func__);
    [self showBanner];
}

- (void)nativeExpressBannerAdView:(BUNativeExpressBannerView *)bannerAdView didLoadFailWithError:(NSError *)error {
    NSLog(@"%s",__func__);
    NSLog(@"error code : %ld , error message : %@",(long)error.code,error.description);
}

- (void)nativeExpressBannerAdViewRenderSuccess:(BUNativeExpressBannerView *)bannerAdView {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressBannerAdViewRenderFail:(BUNativeExpressBannerView *)bannerAdView error:(NSError *)error {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressBannerAdViewWillBecomVisible:(BUNativeExpressBannerView *)bannerAdView {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressBannerAdViewDidClick:(BUNativeExpressBannerView *)bannerAdView {
    NSLog(@"%s",__func__);
}

- (void)nativeExpressBannerAdView:(BUNativeExpressBannerView *)bannerAdView dislikeWithReason:(NSArray<BUDislikeWords *> *)filterwords {
    NSLog(@"%s",__func__);
    [UIView animateWithDuration:0.25 animations:^{
        bannerAdView.alpha = 0;
    } completion:^(BOOL finished) {
        [bannerAdView removeFromSuperview];
        self.bannerView = nil;
    }];
}

- (void)nativeExpressBannerAdViewDidCloseOtherController:(BUNativeExpressBannerView *)bannerAdView interactionType:(BUInteractionType)interactionType {
    NSString *str = nil;
    if (interactionType == BUInteractionTypePage) {
        str = @"ladingpage";
    } else if (interactionType == BUInteractionTypeVideoAdDetail) {
        str = @"videoDetail";
    } else {
        str = @"appstoreInApp";
    }
    NSLog(@"%s __ %@",__func__,str);
}

@end

4.開屏廣告

//
//  TTSplashAd.h
//
//  Created by Jaymz on 2020/7/24.
//

@interface TTSplashAd : UIViewController
{
    
}

+(TTSplashAd*) getInstance;
-(void) ShowSplashAd:(NSString *) adId;
@end
//
//  TTSplashAd.mm
//
//  Created by Jaymz on 2020/7/24.
//

#import <Foundation/Foundation.h>
#import "TTSplashAd.h"
#import <BUAdSDK/BUSplashAdView.h>

@interface TTSplashAd()<BUSplashAdDelegate>
@property (nonatomic, strong) BUSplashAdView *splashView;
@end

static TTSplashAd* m_instance;

@implementation TTSplashAd

+(TTSplashAd*) getInstance
{
    return m_instance;
}

-(void)viewDidLoad
{
    [super viewDidLoad];
    m_instance = self;
    NSLog(@"viewDidLoad");
}

-(void) ShowSplashAd:(NSString *)adId
{
    NSLog(@"調(diào)用開屏廣告展示");
    CGRect frame=[UIScreen mainScreen].bounds;
    BUSplashAdView *splashView = [[BUSplashAdView alloc] initWithSlotID:adId frame:frame];
    //yyyyyyyyyy是你在穿山甲后臺對應的廣告位Id
    splashView.delegate = self;
    UIWindow *keyWindow =[UIApplication sharedApplication].windows.firstObject;
    [splashView loadAdData];
    [keyWindow.rootViewController.view addSubview:splashView];
    splashView.rootViewController = keyWindow.rootViewController;
}

#pragma mark --Splash Delegate
- (void)splashAdDidLoad:(BUSplashAdView *)splashAd {
    NSLog(@"splashAdDidLoad");
    NSLog(@"mediaExt-%@",splashAd.mediaExt);
}

- (void)splashAdDidClose:(BUSplashAdView *)splashAd {
    NSLog(@"splashAdView AdDidClose");
    [splashAd removeFromSuperview];
}

- (void)splashAd:(BUSplashAdView *)splashAd didFailWithError:(NSError *)error {
    NSLog(@"splashAdView load data fail");
    [splashAd removeFromSuperview];
    NSLog(@"error code : %ld , error message : %@",(long)error.code,error.description);
}

- (void)splashAdDidCloseOtherController:(BUSplashAdView *)splashAd interactionType:(BUInteractionType)interactionType {
    NSString *str = @"";
    if (interactionType == BUInteractionTypePage) {
        str = @"ladingpage";
    } else if (interactionType == BUInteractionTypeVideoAdDetail) {
        str = @"videoDetail";
    } else {
        str = @"appstoreInApp";
    }
    //彈窗提示
//    #pragma clang diagnostic push
//    #pragma clang diagnostic ignored"-Wdeprecated-declarations"
//        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:str message:[NSString stringWithFormat:@"%s",__func__] delegate:self cancelButtonTitle:nil otherButtonTitles:@"ok", nil];
//        [alert show];
//    #pragma clang diagnostic pop
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end

開屏廣告需要在AppController.mm的didFinishLaunchingWithOptions函數(shù)中挖滤,app->start(); 之前調(diào)用

    UIViewController *splashAd = [[TTSplashAd alloc] init];
    [_viewController.view addSubview:splashAd.view];
    [[TTSplashAd getInstance] ShowSplashAd:@"開屏廣告ID"]; //展示開屏廣告
最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市浅役,隨后出現(xiàn)的幾起案子斩松,更是在濱河造成了極大的恐慌,老刑警劉巖担租,帶你破解...
    沈念sama閱讀 206,968評論 6 482
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件砸民,死亡現(xiàn)場離奇詭異,居然都是意外死亡奋救,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,601評論 2 382
  • 文/潘曉璐 我一進店門反惕,熙熙樓的掌柜王于貴愁眉苦臉地迎上來尝艘,“玉大人,你說我怎么就攤上這事姿染”澈ィ” “怎么了?”我有些...
    開封第一講書人閱讀 153,220評論 0 344
  • 文/不壞的土叔 我叫張陵悬赏,是天一觀的道長狡汉。 經(jīng)常有香客問我,道長闽颇,這世上最難降的妖魔是什么盾戴? 我笑而不...
    開封第一講書人閱讀 55,416評論 1 279
  • 正文 為了忘掉前任,我火速辦了婚禮兵多,結(jié)果婚禮上尖啡,老公的妹妹穿的比我還像新娘。我一直安慰自己剩膘,他們只是感情好衅斩,可當我...
    茶點故事閱讀 64,425評論 5 374
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著怠褐,像睡著了一般畏梆。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上奈懒,一...
    開封第一講書人閱讀 49,144評論 1 285
  • 那天奠涌,我揣著相機與錄音,去河邊找鬼筐赔。 笑死铣猩,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的茴丰。 我是一名探鬼主播达皿,決...
    沈念sama閱讀 38,432評論 3 401
  • 文/蒼蘭香墨 我猛地睜開眼天吓,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了峦椰?” 一聲冷哼從身側(cè)響起龄寞,我...
    開封第一講書人閱讀 37,088評論 0 261
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎汤功,沒想到半個月后物邑,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,586評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡滔金,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,028評論 2 325
  • 正文 我和宋清朗相戀三年色解,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片餐茵。...
    茶點故事閱讀 38,137評論 1 334
  • 序言:一個原本活蹦亂跳的男人離奇死亡科阎,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出忿族,到底是詐尸還是另有隱情锣笨,我是刑警寧澤,帶...
    沈念sama閱讀 33,783評論 4 324
  • 正文 年R本政府宣布道批,位于F島的核電站错英,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏隆豹。R本人自食惡果不足惜椭岩,卻給世界環(huán)境...
    茶點故事閱讀 39,343評論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望噪伊。 院中可真熱鬧簿煌,春花似錦、人聲如沸鉴吹。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,333評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽豆励。三九已至夺荒,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間良蒸,已是汗流浹背技扼。 一陣腳步聲響...
    開封第一講書人閱讀 31,559評論 1 262
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留嫩痰,地道東北人剿吻。 一個月前我還...
    沈念sama閱讀 45,595評論 2 355
  • 正文 我出身青樓,卻偏偏與公主長得像串纺,于是被迫代替她去往敵國和親丽旅。 傳聞我的和親對象是個殘疾皇子椰棘,可洞房花燭夜當晚...
    茶點故事閱讀 42,901評論 2 345

推薦閱讀更多精彩內(nèi)容