CJPAdControlleriOS 广告组件

联合创作 · 2023-09-27 21:18

CJPAdController 是个为应用提供简单方法来添加 iAd 和 Google AdMob 广告的控件。



示例代码:



- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.

RootViewController *rootVC = [[RootViewController alloc] init];
_navController = [[UINavigationController alloc] initWithRootViewController:rootVC];
_adController = [[CJPAdController sharedManager] initWithContentViewController:_navController];

self.window.rootViewController = _adController;
[self.window makeKeyAndVisible];
return YES;
}

 

浏览 13
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报