Skip to content

Commit

Permalink
Revised based on distante feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
warren@mac-m2 authored and distante committed Aug 23, 2023
1 parent 76d35f2 commit f539d3c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ios/Plugin/Banner/BannerExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ class BannerExecutor: NSObject, GADBannerViewDelegate {
let width = subView.frame.width
var height = subView.frame.height
// For fixing issue 160 iOs banner overlapping content on iPhone with rounded corners
if let window = UIApplication.shared.keyWindow {
let safeAreaBottom = window.safeAreaInsets.bottom
height = height + safeAreaBottom
}
let safeAreaBottom = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
height += safeAreaBottom

self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
"width": width,
Expand Down Expand Up @@ -158,10 +156,8 @@ class BannerExecutor: NSObject, GADBannerViewDelegate {
let width = bannerView.frame.width
var height = bannerView.frame.height
// For fixing issue 160 iOs banner overlapping content on iPhone with rounded corners
if let window = UIApplication.shared.keyWindow {
let safeAreaBottom = window.safeAreaInsets.bottom
height = height + safeAreaBottom
}
let safeAreaBottom = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
height += safeAreaBottom

self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
"width": width,
Expand Down

0 comments on commit f539d3c

Please sign in to comment.