【发布时间】:2018-06-09 05:21:30
【问题描述】:
我已经在 UITableView 中实现了 facebook 原生广告,前 1-2 次它可以点击,但是当我滚动 tableview 并再次回到同一个单元格时,现在广告没有点击,我使用的是 swift 3.2 下面是单元实现。
let ad = adsManager.nextNativeAd
let cell = self.tableHome.dequeueReusableCell(withIdentifier: "HomeAdsTableViewCell", for: indexPath) as! HomeAdsTableViewCell
cell.message.text = ad?.body
cell.title.text = ad?.title
cell.callToActionButton.setTitle(ad?.callToAction, for: .normal)
if let pic = ad?.coverImage {
cell.postImage.setImageWithIndicator(imageUrl:pic.url.absoluteString)
}
ad?.registerView(forInteraction: cell.postView, with: self)
cell.selectionStyle=UITableViewCellSelectionStyle.none
return cell
【问题讨论】:
标签: ios swift facebook uitableview native-ads