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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -