How to display image from NSFileManager Url in swift -


how can display image in uiimageview from

documentsdirectoryurl.urlbydeletinglastpathcomponent!.urlbydeletinglastpathcomponent!.urlbydeletinglastpathcomponent!.urlbyappendingpathcomponent("img")) 

for example, this

imageview.image = uiimage(documentsdirectoryurl.urlbydeletinglastpathcomponent!.urlbydeletinglastpathcomponent!.urlbydeletinglastpathcomponent!.urlbyappendingpathcomponent("img"))) 

this documentdirectoryurl

let documentsdirectoryurl = nsfilemanager().urlsfordirectory(.documentdirectory, indomains: .userdomainmask).first as! nsurl

try

imageview.image = uiimage(contentsoffile: documentsdirectoryurl.urlbydeletinglastpathcomponent!.urlbydeletinglastpathcomponent!.urlbydeletinglastpathcomponent!.urlbyappendingpathcomponent("img")).path) 

good luck


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -