Medium Rectangle Ads
Showing an MREC
fun showBanner() {
val bannerOptions = BannerOptions().withSize(BannerSize.MREC)
// if you don't specify your container view,
// we'll display it at the bottom of the screen
.placeInContainer(YOUR_CONTAINER_VIEW_GOES_HERE)
Banner.show("placementId", bannerOptions, activity)
}private void showBanner() {
BannerOptions bannerOptions = new BannerOptions().withSize(BannerSize.MREC)
// if you don't specify your container view,
// we'll display it at the bottom of the screen
.placeInContainer(YOUR_CONTAINER_VIEW_GOES_HERE);
Banner.show("placementId", bannerOptions, activity);
} FYBBanner.delegate = MyBannerDelegate()
let bannerOptions = FYBBannerOptions(placementId: "1234", size: .MREC)
FYBBanner.request(with: options)#import <FairBidSDK/FairBid.h>
FYBBanner.delegate = [[MyBannerDelegate alloc] init];
NSString *placementId = @"1234";
FYBBannerOptions *bannerOptions = [[FYBBannerOptions alloc] initWithPlacementId:@"1234" size:FYBBannerSizeMREC];
[FYBBanner requestWithOptions:bannerOptions];extension MyViewController: FYBBannerDelegate {
func bannerDidLoad(_ banner: FYBBannerAdView, impressionData: FYBImpressionData)
{
// set up the MREC banner constraints
myView.addSubview(banner)
banner.center = CGPoint(x: myView.frame.width / 2, y: myView.center.y)
}
…
}Last updated
