ios - Setting CAEmitterLayer properties with KVC -
i attempting to change properties on caemitterlayer instance dynamically. making call setvalue:forkey: this: [self.mainviewcontroller.mainview.spaceview.emitterlayer setvalue:[nsnumber numberwithfloat:0] forkey:@"emittercells.particle.velocityrange"];
not seeing change in particle emitter. if set property 0 hard coding no particles emitted. here link gist file containing uiview implements particle system. know kvc can tricky miss typing maybe i'm over-looking obvious?
so maybe i'm over-looking obvious
indeed. problem line:
setvalue:[nsnumber numberwithfloat:0] forkey:@"emittercells.particle.velocityrange"
the string "emittercells.particle.velocityrange"
not key.
it key path. need call setvalue:forkeypath:
.
Comments
Post a Comment