another.im-ios/Monal/another.im/Helpers/View+Flip.swift

16 lines
309 B
Swift
Raw Normal View History

2024-11-19 16:07:47 +00:00
import SwiftUI
struct FlipView: ViewModifier {
func body(content: Content) -> some View {
content
.rotationEffect(.radians(Double.pi))
.scaleEffect(x: -1, y: 1, anchor: .center)
}
}
extension View {
func flip() -> some View {
modifier(FlipView())
}
}