iOS: I get many `UIImage` from network, how can I know their `aspect ratio`? -


how can aspect ratio image comes server?

edit:if many image in network, how can them using async function ? , in block aspect ratio?

once download image, create uiimage instance using downloaded data through size property, able determine height , width of actual image downloaded :

let image = uiimage(data: <imagedownloadeddata>) let imgwidth = image.size.width let imgheight = image.size.height 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -