BoundingBoxAttachment is supposed to be a subclass of Attachment in SpineCppLite, but in Swift Spine, they’re not treated that way since both inherit from NSObject. When we’re trying to get the bounding box, we end up with an Attachment object, but SkeletonBounds needs a BoundingBoxAttachment to get the Polygon. So, we need to support type conversion for this.
BoundingBoxAttachment
is supposed to be a subclass ofAttachment
in SpineCppLite, but in Swift Spine, they’re not treated that way since both inherit fromNSObject
. When we’re trying to get the bounding box, we end up with anAttachment
object, butSkeletonBounds
needs aBoundingBoxAttachment
to get thePolygon
. So, we need to support type conversion for this.Demo:
InteractiveSpineView
InteractiveSpineViewModel