ios - circular Profile picture using Quartzcore framework -


i want make set image uiimageview circularly.

my uiimageview width , height 150 , image want set 50 x 50 below code have tried:

self.profileimageview.layer.cornerradius = self.profileimageview.frame.size.width / 2; self.profileimageview.layer.borderwidth = 3.0f; self.profileimageview.layer.bordercolor = [uicolor whitecolor].cgcolor; self.profileimageview.clipstobounds = yes; 

by using above code getting blurred image.

any ideas or suggestions?

ok want scale image use code..

- (uiimage *)imagewithimage:(uiimage *)image scaledtosize:(cgsize)newsize { uigraphicsbeginimagecontextwithoptions(newsize, no, 0.0); [image drawinrect:cgrectmake(0, 0, newsize.width, newsize.height)]; uiimage *newimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); return newimage;} 

and wherever set image this..

self.profileimageview=[self imagewithimage:self.profileimageview.image scaledtosize:cgsizemake(50, 50)]; 

i hope you..


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -