ios - Best way to animate scaling and sizing of buttons in Swift? -
i'm using code below animate intro-animation buttons in ios swift game. code inside of update function , same lot of buttons.
if self.creditsbutton.size.width < 40 { self.creditsbutton.size.width += 1 self.creditsbutton.size.height += 1 }
my question is; there better (more clean) way animate scaling/sizes of buttons/menu's?
if button subclass of skspritenode
skaction enables schedule animation without needing regularly update, e.g. (apologies objective-c):
skaction *scale = [skaction resizetowidth:40.0 duration:0.4]; [spritenode runaction:scale];
Comments
Post a Comment