Skip to content

Commit 0c8b1f1

Browse files
Nicholas Ventimigliacopybara-github
authored andcommitted
Updated collapsible banner examples to use adaptive sizes.
PiperOrigin-RevId: 922365958
1 parent ae58229 commit 0c8b1f1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Objective-C/advanced/APIDemo/APIDemo/CollapsibleBannerViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ - (void)viewDidAppear:(BOOL)animated {
5454
// view has been laid out.
5555
CGRect frame = UIEdgeInsetsInsetRect(self.view.frame, self.view.safeAreaInsets);
5656
CGFloat viewWidth = frame.size.width;
57-
GADAdSize adSize = GADLargeAnchoredAdaptiveBannerAdSizeWithWidth(viewWidth);
57+
GADAdSize adSize = GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(viewWidth);
5858
_bannerView.adSize = adSize;
5959

6060
[self loadAd];

Swift/advanced/APIDemo/APIDemo/CollapsibleBannerViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class CollapsibleBannerViewController: UIViewController, BannerViewDelegate {
4848
return view.frame.inset(by: view.safeAreaInsets)
4949
}()
5050
let viewWidth = frame.size.width
51-
bannerView.adSize = largeAnchoredAdaptiveBanner(width: viewWidth)
51+
bannerView.adSize = currentOrientationAnchoredAdaptiveBanner(width: viewWidth)
5252

5353
loadAd()
5454
}

0 commit comments

Comments
 (0)