UIImage from URL

UIImage * img = [[UIImage alloc] initWithData:
[NSData dataWithContentsOfURL:
[NSURL URLWithString:@”http://example.com/image.png”]]];

Si queremos cargar la imagen de un archivo del proyecto:

[UIImage imageWithContentsOfFile:
[[NSBundle mainBundle] pathForResource:@”thefilename” ofType:@”jpg”]];

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

* Please enter the Biggest Number