ios - How to make two sides edges with keeping scale mode Aspect fill? -
i trying make edges 2 sides in scene using code
let leftedge : sknode = sknode() leftedge.physicsbody = skphysicsbody(edgefrompoint: cgpointzero , topoint:cgpointmake(0.0, self.frame.size.height + 100)) leftedge.position = cgpointzero; leftedge.physicsbody!.categorybitmask = edgecategory; leftedge.physicsbody!.collisionbitmask = bubblescategory; self.addchild(leftedge) // right edge let rightedge : sknode = sknode() rightedge.physicsbody = skphysicsbody(edgefrompoint: cgpointzero , topoint:cgpointmake(0.0, self.frame.size.height + 100)) rightedge.position = cgpointmake(self.frame.size.width, 0.0); rightedge.physicsbody!.categorybitmask = edgecategory; rightedge.physicsbody!.collisionbitmask = bubblescategory; self.addchild(rightedge)
it works fine if use resizefill
scale mode want make mode aspectfill
how can make edges keeping mode aspectfill
?
Comments
Post a Comment