NachoSoto / NSBSpritesheetLayer

Spritesheet animations in UIKit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to scale spritesheet animation?

ankit01217 opened this issue · comments

I am using NSBSpritesheetLayer for animation from spritesheet in Swift UIKit. But when i try to scale NSBSpritesheetLayer, animation images do not scale.I tried changing layer's frame and transform both but none of them worked. Is there any way i can scale animation view to match parent view ?

That's probably because the layer's frame is updated at every frame. What you want to do is wrap the NSBSpritesheetLayer into a parent layer, and animate that one.

Let me know if that solves your problem!