要运行示例项目,请克隆仓库,并为位于Example目录中的项目运行pod install
。
Storyboard/programmatically: [create RootViewController "CommonBannerController" as a container]
Put this in your AppDelegate.m
...
[CommonBanner regitserProvider:[CommonBannerProvideriAd class]
withPriority:CommonBannerPriorityHigh
requestParams:nil];
[CommonBanner regitserProvider:[CommonBannerProviderGAd class]
withPriority:CommonBannerPriorityLow
requestParams:@{keyAdUnitID : @"ca-app-pub-3940256099942544/2934735716",
keyTestDevices : @[kGADSimulatorID]}];
//[CommonBanner setDebugMode:NO];
[CommonBanner startManaging];
...
In your "ViewController.m" #import CommonBanner.h
To present ads SIMPLY CALL self.canDisplayAds = YES
That's it!
Enjoy
Comming soon :-)
Requires iOS 7 and later
Written in ARC
CommonUtilsAds可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中:
pod "CommonUtilsAds"
Karen Lusinyan, [email protected]
CommonUtilsAds可使用MIT许可证获得。有关更多信息,请参阅LICENSE文件。