File tree Expand file tree Collapse file tree
CommonKit/Sources/CommonKit/Helpers/UIHelpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//
22// InteractiveBackgroundView.swift
3- //
3+ // CommonKit
44//
55// Created by Dmitrij Meidus on 06.03.2026.
66//
@@ -11,15 +11,19 @@ import UIKit
1111/// A UIViewRepresentable that wraps a real UIView with a background color.
1212/// Unlike SwiftUI's Color, this creates an actual UIKit subview
1313/// that TransparentWindow._hitTest can detect for proper hit testing.
14- struct InteractiveBackgroundView : UIViewRepresentable {
15- let color : UIColor
14+ public struct InteractiveBackgroundView : UIViewRepresentable {
15+ public let color : UIColor
16+
17+ public init ( color: UIColor ) {
18+ self . color = color
19+ }
1620
17- func makeUIView( context: Context ) -> UIView {
21+ public func makeUIView( context: Context ) -> UIView {
1822 let view = UIView ( )
1923 view. backgroundColor = color
2024 view. isUserInteractionEnabled = true
2125 return view
2226 }
2327
24- func updateUIView( _ uiView: UIView , context: Context ) { }
28+ public func updateUIView( _ uiView: UIView , context: Context ) { }
2529}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ struct NotificationPresenterView: View {
6262}
6363extension NotificationPresenterView {
6464 fileprivate func processGeometry( _ geometry: GeometryProxy ) -> some View {
65- return Color . init ( uiColor : . adamant. swipeBlockColor)
65+ return InteractiveBackgroundView ( color : . adamant. swipeBlockColor)
6666 . cornerRadius ( 10 )
6767 }
6868 fileprivate func onTap( ) {
You can’t perform that action at this time.
0 commit comments