iphone screenshot specific area -


i have view including toolbar , webview

uiview   uitoolbar   uiwebview 

now make screenshot webview with:

    uigraphicsbeginimagecontext(articlewebview.window.bounds.size);          [articlewebview.window.layer renderincontext:uigraphicsgetcurrentcontext()];     uiimage *screenimage = uigraphicsgetimagefromcurrentimagecontext();     uigraphicsendimagecontext(); 

but imagecapture starts top of screen. includes toolbar (even 20 empty pixel @ top statusbar)

how can capture image thats actual in uiwebview?

thanks chris

your uiwebview backed own layer, should able grab displayed contents it:

uigraphicsbeginimagecontext(articlewebview.bounds.size);      [articlewebview.layer renderincontext:uigraphicsgetcurrentcontext()]; uiimage *screenimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -