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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -