Files
NearFuture/Shared/Extensions.swift
neon443 3ee22da036 made events update propery when changing on ios
update animations on adding and removing events
fix symbolpicker crash on fast scroll by making it not show all the symbols lol
might be ready to ship?
2025-06-19 09:37:15 +01:00

38 lines
655 B
Swift

//
// Extension.swift
// NearFuture
//
// Created by neon443 on 21/05/2025.
//
import Foundation
import SwiftUI
extension View {
var backgroundGradient: some View {
return LinearGradient(
gradient: Gradient(colors: [.bgTop, .two]),
startPoint: .top,
endPoint: .bottom
)
.ignoresSafeArea(.all)
}
}
extension AnyTransition {
static var moveAndFade: AnyTransition {
.asymmetric(
insertion: .opacity,
removal: .move(edge: .trailing)
)
.combined(with: .opacity)
}
static var moveAndFadeReversed: AnyTransition {
.asymmetric(
insertion: .opacity,
removal: .move(edge: .leading)
)
.combined(with: .opacity)
}
}