swift - Get Image Size Without Loading The Image -
i using below size of image. without creating sprite node, if make sense.
let nodeimage = skspritenode(imagenamed: "nodeimage") let nodewidth = nodeimage.size.width let nodeheight = nodeimage.size.height
what access images file , find out size of specific image. below (clearly doesn't work, example)
let nodeheight = (imagenamed: "nodeimage").size.height
any great.
you use uiimage
class. has e init method similar of skspritenode
:
uiimage(named name: string)
and can use size
property of uiimage obtain height in points of image.
Comments
Post a Comment