iOS 原生广告在 UITableView 单元格中不可点击

问题描述

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

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

enter image description here

以及显示原生广告的代码

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 (将#修改为@)