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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -