Creating particles in SwiftUI - in less than 50 lines of code

I have put together a short video about creating particle effects with SwiftUI. It showcases the easiest/lazy way, which is great for simple eye candies and experimenting.

Please note, that it is not the most performant way how to deal with particle effects in SwiftUI. If you need to go crazy about blending and high particle count, there are better ways:

  • using canvas view
  • embed SpriteKit view
  • using MetalKit But more on these another time ;)