mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-19 07:54:09 +01:00
27 lines
510 B
Swift
Executable File
27 lines
510 B
Swift
Executable File
/*
|
||
See LICENSE folder for this sample’s licensing information.
|
||
|
||
Abstract:
|
||
A view that displays a rotated version of a badge symbol.
|
||
*/
|
||
|
||
import SwiftUI
|
||
|
||
struct RotatedBadgeSymbol: View {
|
||
let angle: Angle
|
||
|
||
var body: some View {
|
||
BadgeSymbol()
|
||
.padding(-60)
|
||
.rotationEffect(angle, anchor: .bottom)
|
||
}
|
||
}
|
||
|
||
#if DEBUG
|
||
struct RotatedBadgeSymbol_Previews: PreviewProvider {
|
||
static var previews: some View {
|
||
RotatedBadgeSymbol(angle: .init(degrees: 5))
|
||
}
|
||
}
|
||
#endif
|