I currently have an Admob Native Express Ad (GADNativeExpressAdView) configured in a UICollectionViewCell.
- I used the storyboard to set it up by adding an empty view and assigning the GADNativeExpressAdView class to it.
- Everything loads up fine and an ad appears every 10 cells for example.
Problem: The first time the user opens the app and starts scrolling down the list of cells, when they reach the Ad cell, the scrolling blocks until the Native Ad is "built". Once it's done, scrolling continues. The ad then might take a moment (1-2 seconds) to load up the ad request.
- The loading request does not seem to be the culprit.
- I've also setup the ad programmatically, and it seems to mainly hang when I add the ad view as a subview of the cell the first time.
Let's say an ad should appear in cell #20, #30, etc, the second time (and every other one after that), the scrolling is uninterrupted. It only happens for the first one.
Any ideas on how to fix this would be really appreciated. Is this a problem with GADNativeExpressAdView itself?
Thank you.
AdCollectionViewCell.Swift
class AdCollectionViewCell: UICollectionViewCell {
@IBOutlet var intercellBanner: GADNativeExpressAdView!
override func awakeFromNib() {
super.awakeFromNib()
let request = GADRequest()
request.testDevices = [kGADSimulatorID]
self.intercellBanner.loadRequest(request)
}
override func prepareForReuse() {
super.prepareForReuse()
let request = GADRequest()
request.testDevices = [kGADSimulatorID]
self.intercellBanner.loadRequest(request)
}
}
Aucun commentaire:
Enregistrer un commentaire