iphone - how to convert the part of UIView into UIImage and display it in imageView -


i have view in drawing signature want signature part of view should converted uiimage , display in uiimageview here code got net using converting

    uigraphicsbeginimagecontext(signatureview.bounds.size);    [signatureview.layer renderincontext:uigraphicsgetcurrentcontext()];    uiimage *img = uigraphicsgetimagefromcurrentimagecontext();    logoimageview.image=img;    uigraphicsendimagecontext(); 

try hope you.

 - (uiimage *) getuiimagewithmyview:(uimyview *)myview     {         uigraphicsbeginimagecontextwithoptions(myview.bounds.size, myview.opaque, 0.0);         [myview.layer renderincontext:uigraphicsgetcurrentcontext()];          uiimage * myimage = uigraphicsgetimagefromcurrentimagecontext();          uigraphicsendimagecontext();          return myimage;     } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -