Skip to content

Commit 8ca8d62

Browse files
committed
Mark DeleteGesture components unavailable on visionOS and tvOS
Added @available attributes to DGDeletableItem and the onDelete view modifier to explicitly mark them as unavailable on visionOS and tvOS platforms.
1 parent 100d329 commit 8ca8d62

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Sources/DeleteGesture/Public/DeletableItem.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SwiftUI
1010

1111
@available(iOS 18, macOS 15, *)
1212
@available(tvOS, unavailable)
13+
@available(visionOS, unavailable)
1314
public struct DGDeletableItem<Content: View>: View {
1415
///Defines the action to execute when the Delete-Point entered
1516
private var onDelete: () -> Void

Sources/DeleteGesture/Public/View Modifier.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import SwiftUI
88

99
@available(macOS 15, iOS 18, *)
10+
@available(visionOS, unavailable)
11+
@available(tvOS, unavailable)
1012
extension View{
1113
public func onDelete(perform action: @escaping () -> Void) -> some View {
1214
DGDeletableItem(onDelete: action, content: { self })

0 commit comments

Comments
 (0)