Reorganize AltStore project into UIKit and SwiftUI folders

This commit is contained in:
naturecodevoid
2023-05-20 12:35:53 -07:00
parent e06cca8224
commit 2db073d2c5
115 changed files with 41 additions and 25 deletions

View File

@@ -0,0 +1,35 @@
//
// Modifiers.swift
// SideStore
//
// Created by Fabian Thies on 01.12.22.
// Copyright © 2022 SideStore. All rights reserved.
//
import SwiftUI
extension View {
@ViewBuilder func `if`<Content: View>(_ condition: Bool, @ViewBuilder transform: (Self) -> Content) -> some View {
if condition {
transform(self)
} else {
self
}
}
@ViewBuilder func searchable(text: Binding<String>, placeholder: String) -> some View {
if #available(iOS 15.0, *) {
self.searchable(text: text, prompt: Text(placeholder))
} else {
self
}
}
@ViewBuilder func tintedBackground(_ color: Color) -> some View {
self
.blurBackground(.systemUltraThinMaterial)
.background(color.opacity(0.4))
}
}