Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// InteractiveBackgroundView.swift
//
// CommonKit
//
// Created by Dmitrij Meidus on 06.03.2026.
//
Expand All @@ -11,15 +11,19 @@ import UIKit
/// A UIViewRepresentable that wraps a real UIView with a background color.
/// Unlike SwiftUI's Color, this creates an actual UIKit subview
/// that TransparentWindow._hitTest can detect for proper hit testing.
struct InteractiveBackgroundView: UIViewRepresentable {
let color: UIColor
public struct InteractiveBackgroundView: UIViewRepresentable {
public let color: UIColor

public init(color: UIColor) {
self.color = color
}

func makeUIView(context: Context) -> UIView {
public func makeUIView(context: Context) -> UIView {
let view = UIView()
view.backgroundColor = color
view.isUserInteractionEnabled = true
return view
}

func updateUIView(_ uiView: UIView, context: Context) {}
public func updateUIView(_ uiView: UIView, context: Context) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct NotificationPresenterView: View {
}
extension NotificationPresenterView {
fileprivate func processGeometry(_ geometry: GeometryProxy) -> some View {
return Color.init(uiColor: .adamant.swipeBlockColor)
return InteractiveBackgroundView(color: .adamant.swipeBlockColor)
.cornerRadius(10)
}
fileprivate func onTap() {
Expand Down
Loading