-
Notifications
You must be signed in to change notification settings - Fork 8
Integrating Full Screen Overlay Ad
Vladas Drejeris edited this page Jun 3, 2021
·
3 revisions
It is very easy to display overlay ads with Adform Advertising SDK. You just need to initialize AFAdOverlay
object and display it.
You just need to call showFromViewController:
method on AFAdOverlay
object and it will handle everything. First, it will load the ad and then display it to the user. It is important that you must retain the AFAdOverlay object, otherwise, ARC is going to release it before the ads are loaded.
Swift
...
//First, you need to create a property to retain the AFAdOverlay object.
private var overlayAd: AFAdOverlay?
...
override func viewDidLoad() {
super.viewDidLoad()
//Second, initialize AFAdOverlay.
overlayAd = AFAdOverlay(masterTagID: MasterTagID)
//Third, start ad loading.
overlayAd?.show(from: self)
}
Objective-C
...
//First, you need to create a property or an instance variable to retain the AFAdOverlay object.
@property (nonatomic, strong) AFAdOverlay *overlayAd;
...
- (void)viewDidLoad {
[super viewDidLoad];
//Second, initialize AFAdOverlay.
self.overlayAd = [[AFAdOverlay alloc] initWithMasterTagID:MasterTagID];
//Third, start ad loading.
[self.overlayAd showFromViewController:self];
}
That's it, your application can now display overlay ads.
For a complete example of how to integrate Adform full-screen overlay ads into your application, check out the sample app.
Basic integrations
- Integrating Inline Ad
- Integrating Full Screen Overlay Ad
- Integrating AdHesion Ad
- Integrating Interstitial Ad
- Video Ad Integration
- Debug mode
- Troubleshooting
Advanced integrations
- Advanced Inline Ad Integration
- Integrating Inline Ads in UITableView
- Advanced Full Screen Overlay Ad Integration
- Advanced Interstitial Ad Integration
- Instream Video Ads
Other
- Adding Custom Values
- Adding Keywords
- Adding Key Value Pairs
- Adding Search Words
- Location Tracking
- Security
- Ad Tags
- Header Bidding
- Changing ADX Domain
- Specifying banner loading behaviour
- Customizing in app browser
- GDPR
- US Privacy
- Localization
- In app deeplinks
Mediation adapters