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
Post a Comment