ios - SpriteKit -- Change SKShapeNode Size -


i have skshapenode created shapenodewithrect: cornerradius:. rounded rect child of skeffectnode can set shouldrasterize = yes.

i'd change width of node based on user's touch. i.e. move finger horizontally right, rect gets bigger (and smaller when move left).

  1. i can replacing original skshapenode new 1 new size (but bad).
  2. i've tried running resize action on skeffectnode , skshapenode (but doesn't work because resize works on skspritenotes [skaction apple docs -- resize]):

[self runaction:[skaction resizetowidth:newsize.width height:newsize.height duration:0]]; [self.shapenode runaction:[skaction resizetowidth:newsize.width height:newsize.height duration:0]];

  1. i change xscale in answer: change height of skshapenode. if this, skshapenode gets pixelated.

how should this?

it's easy in uikit (just set frame of uiview)...


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -