Skip to content

Commit 88d5da1

Browse files
resize correctly in direct integration tableView
1 parent fa789f3 commit 88d5da1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

TeadsSampleApp/Controllers/InRead/Direct/TableView/InReadDirectTableViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ extension InReadDirectTableViewController: TeadsInReadAdPlacementDelegate {
114114
teadsAdView?.bind(ad)
115115
ad.delegate = self
116116
self.adRatio = adRatio
117+
adHeight = adRatio.calculateHeight(for: tableView.bounds.width)
117118
resizeTeadsAd(adRatio: adRatio)
118119
}
119120

@@ -122,8 +123,9 @@ extension InReadDirectTableViewController: TeadsInReadAdPlacementDelegate {
122123
}
123124

124125
func didUpdateRatio(ad: TeadsInReadAd, adRatio: TeadsAdRatio) {
125-
updateAdCellHeight()
126126
self.adRatio = adRatio
127+
adHeight = adRatio.calculateHeight(for: tableView.bounds.width)
128+
updateAdCellHeight()
127129
}
128130

129131
func adOpportunityTrackerView(trackerView: TeadsAdOpportunityTrackerView) {

0 commit comments

Comments
 (0)