How can I get the dimensions of an image that is in a url from swift
??
at the moment I have this code to show the image:
imagenPrincipal.contentMode = .ScaleToFill
let URL = NSURL(string: oferta!.imagen)!
let placeholderImage = UIImage(named: "placeholder")!
imagenPrincipal.sd_setImageWithURL(URL, placeholderImage: placeholderImage, completed: nil)
I use AlamofireImage
to show the image
I need to modify the size of the image according to the width of the screen and the size of the image keeping the aspect ratio
Thanks