debugging - UIImage not writing to or appearing on Desktop -


for whatever reason, i'm not having uiimage appear on desktop. i'm using code means of debugging. however, i'm pretty sure receiving image since uiimage in debugger not null.

uiimage *imgageprofile = [uiimage imagewithdata:                                    [nsdata datawithcontentsofurl:                                     [nsurl urlwithstring: surlpic]]];               // use code debug images             nsurl *alocalurl = [nsurl urlwithstring:@"file:///users/snuffles753/desktop/"];             nsdata *imagedata = uiimagepngrepresentation(imgageprofile);             [imagedata writetourl:alocalurl atomically:yes]; 

-[nsdata writetourl:…] takes url includes name of file you'd created. `not take url of folder, , automatically create file inside of that. current code attempting overwrite existing directory, fails.

instead, specify filename explicitly:

nsurl *alocalurl = [nsurl urlwithstring:@"file:///users/snuffles753/desktop/debug.png"]; 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -