This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private struct ConditionalEnvironmentOverlay<Value: Equatable, OverlayContent: View>: ViewModifier { | |
@Environment(\.self) private var environmentValues | |
private let keyPath: KeyPath<EnvironmentValues, Value> | |
private let value: Value | |
private let overlayContent: OverlayContent | |
init( | |
condition: KeyPath<EnvironmentValues, Value>, | |
equals value: Value, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import UIKit | |
public final class HostingView: UIView { | |
public init(@ViewBuilder content: () -> some View) { | |
super.init(frame: .zero) | |
let contentView = UIHostingConfiguration(content: content) | |
.margins(.all, 0) | |
.makeContentView() |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-interface-format-version: 1.0 | |
// swift-compiler-version: Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.3.38 clang-1600.0.20.6) | |
// swift-module-flags: -target arm64e-apple-ios18.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -library-level api -enable-experimental-feature Macros -enable-experimental-feature ExtensionMacros -enable-experimental-feature IsolatedAny -enable-bare-slash-regex -user-module-version 6.0.70.5.103 -module-name SwiftUI -package-name SwiftUI | |
import Accessibility | |
import Combine | |
import CoreData | |
import CoreFoundation | |
@_exported import CoreGraphics | |
@_exported import CoreTransferable | |
import Darwin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
import UIKit | |
extension UIBlurEffect { | |
public static func variableBlurEffect(radius: Double, imageMask: UIImage) -> UIBlurEffect? { | |
let methodType = (@convention(c) (AnyClass, Selector, Double, UIImage) -> UIBlurEffect).self | |
let selectorName = ["imageMask:", "effectWithVariableBlurRadius:"].reversed().joined() | |
let selector = NSSelectorFromString(selectorName) |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-interface-format-version: 1.0 | |
// swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.12.5 clang-1500.3.9.1.1) | |
// swift-module-flags: -target arm64e-apple-ios17.4 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -library-level api -library-level api -enable-experimental-feature Macros -enable-experimental-feature ExtensionMacros -package-name SwiftUI -enable-bare-slash-regex -user-module-version 5.4.37 -module-name SwiftUI | |
import Accessibility | |
import Combine | |
import CoreData | |
import CoreFoundation | |
@_exported import CoreGraphics | |
import CoreText | |
@_exported import CoreTransferable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
public struct ValuePicker<SelectionValue: Hashable, Content: View>: View { | |
private let title: LocalizedStringKey | |
private let selection: Binding<SelectionValue> | |
private let content: Content | |
public init( | |
_ title: LocalizedStringKey, | |
selection: Binding<SelectionValue>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
final class CardView: UIControl { | |
private let imageView = UIImageView(image: UIImage(named: "Sample")) | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
layer.cornerRadius = 9 |
NewerOlder