emitter = (CAEmitterLayer*)self.layer;
/*** 位置信息 ***/
emitter.emitterPosition = CGPointMake(50, 50);
emitter.emitterSize = CGSizeMake(1, 1);
/*** 粒子 ***/
CAEmitterCell* cell = [CAEmitterCell emitterCell];
/* 出生率 */
cell.birthRate = 0;
/* 生命周期 */
cell.lifetime = 2.0;
/* 生命周期变化范围 */
cell.lifetimeRange = 1;
/* 颜色 */
cell.color = [[UIColor colorWithRed:0.8 green:0.9 blue:0.9 alpha:0.5] CGColor];
/* 图片 */
cell.contents = (id)[[UIImage imageNamed:@"zuobiao@2x.png"] CGImage];
/* 名称 */
[cell setName:@"cell"];
/*** 其他参数 ***/
/* 速度 */
cell.velocity = 100;
/* 速度范围 */
cell.velocityRange = 100;
/* 发射角度 */
cell.emissionRange = M_PI*2;
/* 变大速度 */
cell.scaleSpeed = 0.3;
/* 旋转 */
cell.spin = 0.5;
emitter.renderMode = kCAEmitterLayerAdditive;
emitter.emitterCells = @[cell];<pre name="code" class="objc"><span style="white-space:pre"> </span>[emitter setValue:200] ;
/*
`emitterShape' values. //发射中心的样式
CA_EXTERN NSString * const kCAEmitterLayerPoint
CA_EXTERN NSString * const kCAEmitterLayerLine
CA_EXTERN NSString * const kCAEmitterLayerRectangle
CA_EXTERN NSString * const kCAEmitterLayerCuboid
CA_EXTERN NSString * const kCAEmitterLayerCircle
CA_EXTERN NSString * const kCAEmitterLayerSphere
`emitterMode' values. //发射形式
CA_EXTERN NSString * const kCAEmitterLayerPoints
CA_EXTERN NSString * const kCAEmitterLayerOutline
CA_EXTERN NSString * const kCAEmitterLayerSurface
CA_EXTERN NSString * const kCAEmitterLayerVolume
`renderMode' values. //渲染形式
CA_EXTERN NSString * const kCAEmitterLayerUnordered 无序的
CA_EXTERN NSString * const kCAEmitterLayerOldestFirst 最后生成的在最上面
CA_EXTERN NSString * const kCAEmitterLayerOldestLast 最后生成的在最后面
CA_EXTERN NSString * const kCAEmitterLayerBackToFront
CA_EXTERN NSString * const kCAEmitterLayerAdditive
*/