ios - how to unhide the ScrollView after converting it PDF in iphone application -


i creating pdf uiscrollview.

it works fine , creates pdf problem after creation of pdf scrollview vanished screen , when again load app again shows,so think due pdf creation hides way unhide after creating pdf.

i using following code:

-(void)createpdffromuiview: (uiview*)aview savetodocumentswithfilename: (nsstring*)afilename {     nsmutabledata *pdfdata = [nsmutabledata data];      cgrect scrollsize = cgrectmake(1018,76,1010,1600);      [scrollview setframe:cgrectmake(1018,76,1010,1600)];      // points pdf converter mutable data object , uiview converted     uigraphicsbeginpdfcontexttodata(pdfdata,scrollview.bounds, nil);     uigraphicsbeginpdfpage();     cgcontextref pdfcontext = uigraphicsgetcurrentcontext();      // draws rect view , captured uigraphicsbeginpdfcontexttodata     [aview.layer renderincontext:pdfcontext];      // remove pdf rendering context     uigraphicsendpdfcontext();      // retrieves document directories ios device     nsarray* documentdirectories = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask,yes);     nsstring* documentdirectory = [documentdirectories objectatindex:0];     nsstring* documentdirectoryfilename = [documentdirectory stringbyappendingpathcomponent:afilename];      // instructs mutable data object write context file on disk     [pdfdata writetofile:documentdirectoryfilename atomically:yes];     nslog(@"documentdirectoryfilename: %@",documentdirectoryfilename); } 

as far can see, problem in below line

[scrollview setframe:cgrectmake(1018,76,1010,1600)]; 

this make scrollview out of visible area because origin x 1018. so, not hidden out of screen or visible area.

do need line.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -