Commit 3451b20 1 parent 297cfa2 commit 3451b20 Copy full SHA for 3451b20
File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,44 @@ Button {
244
244
` ` `
245
245
</details>
246
246
247
+ <details>
248
+ <summary>Fireworks effect</summary>
249
+
250
+ <p align="left">
251
+ <img src="Gifs/fireworks.gif" alt="fireworks">
252
+ </p>
253
+
254
+ Use `.animate(.fireworks(color:),animate:)` where `color` is color of animation, `animate` is flag to start animation.
255
+
256
+ ` ` ` swift
257
+ @State var animate: Bool = false
258
+ ...
259
+ Button {
260
+ animate.toggle()
261
+ } label: {
262
+ HStack(spacing: 8) {
263
+ Image(systemName: animate ? "sun.max.fill" : "sun.max")
264
+ .resizable()
265
+ .scaledToFit()
266
+ .animate(.fireworks(color: .white),
267
+ animate: animate)
268
+ .frame(width: 24, height: 24)
269
+ .foregroundColor(.white)
270
+
271
+ Text("Weather")
272
+ .font(.body)
273
+ .fontWeight(.medium)
274
+ .foregroundColor(.white)
275
+ }
276
+ .padding(12)
277
+ .background(
278
+ Rectangle()
279
+ .fill(.blue.opacity(0.8))
280
+ .cornerRadius(12)
281
+ )
282
+ }
283
+ ` ` `
284
+ </details>
247
285
# # Communication
248
286
249
287
- If you **found a bug**, open an issue or submit a fix via a pull request.
You can’t perform that action at this time.
0 commit comments