Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MPTableViewAdPlacer integration overview
// MoPub MPTableViewAdPlacer integration overview
// In table view controller:
self.adPlacer = [MPTableViewAdPlacer placerWithTableView:self.tableView
viewController:self
defaultAdRenderingClass:[SomeTableViewAdCell class]];
...
[self.adPlacer loadAdsForAdUnitID:@"mopub_ad_unit_id"];
// In format definition:
@interface SomeTableViewAdCell : UITableViewCell<MPNativeAdRendering>
+ (CGSize)sizeWithMaximumWidth:(CGFloat)maximumWidth {
return CGSizeMake(maxWidth, 90f);
}
- (void)layoutAdAssets:(MPNativeAd *)adData {
[adData loadImageIntoImageView:self.adImage];
[adData loadTextIntoLabel:self.adTextLabel];
[adData loadIconIntoImageView:self.advertiserIcon];
[adData loadTitleIntoLabel:self.advertiserNameLabel];
}
@Manigandasaravanan

This comment has been minimized.

Copy link

commented Aug 28, 2016

I cant find loadImageIntoImageView, loadTextIntoLabel, loadIconIntoImageView, loadTitleIntoLabel these method in MPNativeAd. Please check and let me know in latest SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.