sprite kit - How to determine if SKTexture uses an @2x or @3x image? -
is there way determine whether existing sktexture uses @2x or @3x image version?
i @ texture's size , compare them wondering if there's more elegant way it, preferably without using uiimage.
here's solution should work ios 9 , os x 10.11:
cgimageref imageref = texture.cgimage; cgfloat *scale = cgimagegetwidth(imageref) / [texture size].width; cgimagerelease(imageref); // not sure if need line?
Comments
Post a Comment