APP集成tapjoy积分墙
这边简单的写了一个tapjoy的积分墙Manager类,如果有需要大家可以下载,你只需要在显示积分墙的地方简单的调用manager类显示函数。
[plain]
[[CPTapjoyManager sharedTJManager] showOfferWall];
[[CPTapjoyManager sharedTJManager] showOfferWall];
CPTapjoyManager.h头文件
[plain]
#import <Foundation/Foundation.h>
#import "TapjoyConnect.h"
#define APP_ID @"fc145b41-7d9b-4942-9d90-6d87162794a5"
#define APP_SECRET_KEY @"z1cWed53f0ZzRwnOaE3L"
@interface CPTapjoyManager : NSObject<TJCAdDelegate,TJCVideoAdDelegate,TJCViewDelegate,UIAlertViewDelegate>
{
int tapPoints;
UIWindow* rootWindow;
}
+(CPTapjoyManager*) sharedTJManager;
-(void) showOfferWall;
-(void)showBannerAd;
-(void)dismissBannerAd;
-(void)showFullScreenAd;
@end
#import <Foundation/Foundation.h>
#import "TapjoyConnect.h"
#define APP_ID @"fc145b41-7d9b-4942-9d90-6d87162794a5"
#define APP_SECRET_KEY @"z1cWed53f0ZzRwnOaE3L"
@interface CPTapjoyManager : NSObject<TJCAdDelegate,TJCVideoAdDelegate,TJCViewDelegate,UIAlertViewDelegate>
{
int tapPoints;
UIWindow* rootWindow;
}
+(CPTapjoyManager*) sharedTJManager;
-(void) showOfferWall;
-(void)showBannerAd;
-(void)dismissBannerAd;
-(void)showFullScreenAd;
@end
CPTapjoyManager.m文件
[plain]
#import "CPTapjoyManager.h"
#import "AppDelegate.h"
#import "DataManager.h"
static CPTapjoyManager * _tjManager;
@implementation CPTapjoyManager
+(CPTapjoyManager *)sharedTJManager
{
if(_tjManager==nil)
{
_tjManager = [[CPTapjoyManager alloc] init];
}
return _tjManager;
}
-(id)init
{
if(self == [super init])
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tjcConnectSuccess:) name:TJC_CONNECT_SUCCESS object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tjcConnectFail:) name:TJC_CONNECT_FAILED object:nil];
[TapjoyConnect requestTapjoyConnect:APP_ID
相关新闻>>
- 发表评论
-
- 最新评论 更多>>