Skip to content

Commit 90b2276

Browse files
committed
Adding a passthrough view on the teadswebviewhelper
1 parent 1c02533 commit 90b2276

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ PODS:
6666

6767
DEPENDENCIES:
6868
- SwiftFormat/CLI
69-
- TeadsAdMobAdapter (~> 5.0.15)
70-
- TeadsAppLovinAdapter (= 5.0.15)
71-
- TeadsSASAdapter (= 5.0.15)
72-
- TeadsSDK (= 5.0.15)
69+
- TeadsAdMobAdapter (~> 5.0)
70+
- TeadsAppLovinAdapter (~> 5.0)
71+
- TeadsSASAdapter (~> 5.0)
72+
- TeadsSDK (~> 5.0)
7373

7474
SPEC REPOS:
7575
trunk:
@@ -104,6 +104,6 @@ SPEC CHECKSUMS:
104104
TeadsSASAdapter: 4bf9c472843b9c1bcd0281fbad6da1d669d8f5f1
105105
TeadsSDK: daa54de78978992bcfcada47a104271fd55cf1ca
106106

107-
PODFILE CHECKSUM: 905cc8855974bb660ad64d393370684fbd5771d9
107+
PODFILE CHECKSUM: 9003282ee893b30b3d0c343b3a7cf4667732b291
108108

109109
COCOAPODS: 1.11.2

TeadsSampleApp/WebViewHelper/TeadsWebViewHelper.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ import WebKit
186186
}
187187

188188
private func createContainerView(topOffset: CGFloat, bottomOffset: CGFloat) -> UIView {
189-
let container = UIView()
189+
let container = PassthroughView()
190190
container.clipsToBounds = true
191191
container.translatesAutoresizingMaskIntoConstraints = false
192192
if let webView = webView {
@@ -454,3 +454,16 @@ extension TeadsWebViewHelper {
454454
let left: CGFloat
455455
}
456456
}
457+
458+
// MARK: PassthroughView
459+
460+
class PassthroughView: UIView {
461+
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
462+
for view in subviews {
463+
if view.isUserInteractionEnabled, view.point(inside: convert(point, to: view), with: event) {
464+
return true
465+
}
466+
}
467+
return false
468+
}
469+
}

0 commit comments

Comments
 (0)