-1
我有我的tableview原生廣告,他們利用這種indexpath顯示:更改didSelectRowAtIndexPath方法FUNC IndexPath
indexPath.row - Int(indexPath.row/adRowStep)
我如何更改didSelectRowAtIndexPath方法功能使用上述indexPath?
編輯
這是從的cellForRowAtIndexPath FUNC代碼
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! NearMeCell
let venue = venues[indexPath.row - Int(indexPath.row/adRowStep)]
let venueTittle = (venue["Name"] as! String)
cell.venueName.text = venueTitle
return cell
}
這是原生廣告代碼:
func configureAdManagerAndLoadAds() {
if adsManager == nil {
adsManager = FBNativeAdsManager(placementID: "adID", forNumAdsRequested: 2)
FBAdSettings.addTestDevice("clientID")
adsManager.delegate = self
adsManager.loadAds()
}
}
如何使用相同的代碼? – alexburtnik
您發佈的代碼行不顯示任何內容,更不用說「原生廣告」。我們需要更多信息。 –
@alexburtnik如何更改didSelectRowAtIndexPath func以適應不同的索引路徑,因爲我可以告訴它使用的是標準indexPath.row –