@@ -54,25 +54,27 @@ private extension CircularProgressBar {
54
54
55
55
var progressCircle : some View {
56
56
style. progressModifier (
57
- Circle ( )
57
+ AnyView (
58
+ Circle ( )
58
59
. trim ( from: 0.0 , to: CGFloat ( progress) )
59
60
. rotation ( . degrees( style. startAngle - 90 ) )
60
61
. stroke ( style: StrokeStyle ( lineWidth: style. progressWidth, lineCap: . round, lineJoin: . round) )
61
62
. foregroundColor ( style. progressColor)
62
63
. animation ( style. animation, value: progress)
63
- . any ( )
64
+ )
64
65
)
65
66
}
66
67
67
68
@ViewBuilder
68
69
var progressText : some View {
69
70
if style. showTitle {
70
71
style. titleModifier (
71
- Text ( " \( progressValue, specifier: " %. \( style. decimals) f " ) % " )
72
- . lineLimit ( 1 )
73
- . font ( style. titleFont)
74
- . foregroundColor ( style. titleColor)
75
- . any ( )
72
+ AnyView (
73
+ Text ( " \( progressValue, specifier: " %. \( style. decimals) f " ) % " )
74
+ . lineLimit ( 1 )
75
+ . font ( style. titleFont)
76
+ . foregroundColor ( style. titleColor)
77
+ )
76
78
)
77
79
}
78
80
}
@@ -94,14 +96,12 @@ private extension CircularProgressBar {
94
96
CircularProgressBar ( progress: progress)
95
97
96
98
CircularProgressBar ( progress: progress)
97
- . shadow ( . elevated)
98
- . circularProgressBarStyle ( . swedish)
99
+ . shadow ( . elevated)
100
+ . circularProgressBarStyle ( . swedish)
99
101
100
- CircularProgressBar (
101
- progress: progress
102
- )
103
- . shadow ( . sticker)
104
- . circularProgressBarStyle ( . noText)
102
+ CircularProgressBar ( progress: progress)
103
+ . shadow ( . sticker)
104
+ . circularProgressBarStyle ( . noText)
105
105
106
106
Button ( " Preview.Progress " ) {
107
107
progress += 0.1
@@ -128,10 +128,10 @@ fileprivate extension CircularProgressBar.Style {
128
128
style. startAngle = 45
129
129
style. progressColor = . yellow
130
130
style. progressWidth = 15
131
- style. progressModifier = { $0. shadow ( . elevated) . any ( ) }
131
+ style. progressModifier = { AnyView ( $0. shadow ( . elevated) ) }
132
132
style. titleColor = . yellow
133
133
style. titleFont = . title. bold ( )
134
- style. titleModifier = { $0. shadow ( . elevated) . any ( ) }
134
+ style. titleModifier = { AnyView ( $0. shadow ( . elevated) ) }
135
135
return style
136
136
}
137
137
0 commit comments