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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -