objective c - upload any Document in iOS -
in application, creating functionality in require upload document of type (pdf/xls/doc/image). after uploading document document name should show in screen , on click of document show document have selected.
how implement functionality, best practise this.
plz provide feedback.
you can create file using below code. here txt file.
nsstring *stringtowrite = @"this string"; nserror *error; nsstring *filepath = [[nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) firstobject] stringbyappendingpathcomponent:@"filename.txt"]; [stringtowrite writetofile:filepath atomically:yes encoding:nsutf8stringencoding error:&error];
Comments
Post a Comment