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