ios - Is there any way to animate Paintcode variables? -


i have stylekit in paintcode 1 stylekit drawing method takes single parameter - there way can use uiview.animatewithduration(etc..) animate parameter view updates smoothly?

you won't animatewithduration because creates keyframes , that's you're doing variables pass draw method generated paintcode.

you'll want implement custom uiview. create property custom class holds variable value param drawing method accepts. overwrite drawrect in order call stylekit draw method , pass in local variable holds value variable.

then you'll use nstimer iterate through values on time, updating custom uiview's property each iteration. trick when property updated you'll need call self.setneedsdisplay (swift) or [self setneedsdisplay:yes]; (obj-c).

there great blog post on available here: https://medium.com/a-first-project-with-paintcode/animating-the-arrow-6e61104b321b


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -