原生广告无法在点击 iOS 时打开

问题描述

我正在使用移动广告 SDK (iOS) 来展示原生广告,这显示效果非常好,但我的主要问题是无法在自定义 UITableView 单元格内点击。我正在使用来自 xib 的单元格。

我的单元格视图层次结构如下。

enter image description here

以及在 cellForRowAtIndexpath显示原生广告的代码

case CardType.ad.rawValue:
    guard let cell = tableView.dequeueReusableCell(withIdentifier: "NativeTableViewCell") as? NativeTableViewCell else { return UITableViewCell() }
    guard let nativeAd = nativeAD else { return UITableViewCell() }
    nativeAd.rootViewController = self
    cell.setupAd(nativeAd)
    guard let adView = cell.contentView.subviews.first as? GADUnifiednativeAdView else { return UITableViewCell() }
    adView.callToActionView?.isUserInteractionEnabled = false
    adView.nativeAd = nativeAd
    return cell

我在委托方法中分配原生广告的地方是 var nativeAD: GADUnifiednativeAd?

func adLoader(_: GADAdLoader,didReceive nativeAd: GADUnifiednativeAd) {
nativeAD = nativeAd

}

有没有其他人遇到过这种问题?。任何帮助表示赞赏。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)