ios - CGPath animation with Facebook POP engine -
i have been using facebook pop engine (https://github.com/facebook/pop) great results since launched earlier year.
until haven't needed implement animation on custom properties, have situation animate cashapelayer cgpath property (which isn't 1 of standard properties).
this suggested method...
prop = [popanimatableproperty propertywithname:@"com.foo.radio.volume" initializer:^(popmutableanimatableproperty *prop) { // read value prop.readblock = ^(cashapelayer *obj, cgfloat values[]) { values[0] = [obj volume]; }; // write value prop.writeblock = ^(cashapelayer *obj, const cgfloat values[]) { [obj setvolume:values[0]]; }; // dynamics threshold prop.threshold = 0.01; }]; anim.property = prop;
but can't work out apply cgpath property.
any suggestions received.
Comments
Post a Comment