Use strict concurrency checking in Xcode 14 to find misuses with Swift concurrency. Cleanup files and rearrange them along with fixing comment headers. Signed-off-by: kingbri <bdashore3@proton.me>
25 lines
532 B
Swift
25 lines
532 B
Swift
//
|
|
// DisableInteraction.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 9/13/22.
|
|
//
|
|
// Disables interaction on any view without applying the appearance
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct DisableInteraction: ViewModifier {
|
|
let disabled: Bool
|
|
|
|
func body(content: Content) -> some View {
|
|
content
|
|
.overlay {
|
|
if disabled {
|
|
Color.clear
|
|
.contentShape(Rectangle())
|
|
.gesture(TapGesture())
|
|
}
|
|
}
|
|
}
|
|
}
|