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
Post a Comment