createFileAtPath, in swift -


i want download files url ( not have direct url ) , save file in local directory different name , extension.

for eg, a.jpg

but when files save, files damaged , can't open anymore.

can me, plz?

you can't rename extension. have convert it.

here way it:

uiimage *myimage = [uiimage imagewithcgimage:imageref]; nsdata *pngdata = uiimagepngrepresentation(myimage); nsdata *jpgdata = uiimagejpegrepresentation(myimage); 

hope helps!!


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -