As Randall and Javy previously answered, you need a CAEmitterLayer, and you probably want to customize it with a preview such as Particle Designer, which doesn't work with CAEmitterLayer.
For CAEmitterLayer, you can use the Particle Playground (Mac App Store) to configure your emitter on your mac in the simulator and export it as code, ready for integration into your project. PP is very similar to Particle Designer.
source share