CJPAdControlleriOS 广告组件
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;
}
评论
