I am trying to load LCR image in UIImageView using "contentsOfFile" method as described in apple document but I am getting error with nil image. Can anyone please confirm how we can load LCR images from server?
Code I am using:
UIImage(contentsOfFile: "LCR file url")
Error I am getting in console:
BOMStorage BOMStorageOpenWithSys(const char , Boolean, BomSys ): can't open: '/LCR file url' No such file or directory
One thing I noticed is it adds "/" in front of my actual url. I think its because its looking for files in local storage. Does anyone know whats the solution of it?
I even tried to use this:
Downloaded file—Load images using imageWithContentsOfFile:
but no use :(