...
Note |
---|
By default, the SDK will set the placement’s height for you. |
Code Block | ||
---|---|---|
| ||
// ViewController.viewDidLoad placement.layoutDelegate = self self.adPlacementHeightConstraint = placement.heightAnchor.constraint(equalToConstant: 0) extension ViewController: AdPlacementLayoutDelegate { func adPlacementHeightWillChange(to newValue: CGFloat) { guard newValue != adPlacementHeightConstraint.constant else { return } adPlacementHeightConstraint.constant = newValue } } |
For an advanced UI layout example please refer to the following:
CollectionView Example -> AdPlacementCollectionViewCell
SwiftUI Example