The Cashapelayer can be used to make random geometry, as a uiimageview mask, to make the picture into a circular effect.
Imgview = [[Uiimageview Alloc]initwithframe:cgrectmake (Ten, +, +)]; Imgview.image = [UIImage imagenamed:@ "ma.jpg"]; uibezierpath* path = [Uibezierpath bezierpathwitharccenter:cgpointmake (max.) radius:40 startangle:0 EndAngle:2*M_PI Clockwise:yes]; cashapelayer* shape = [Cashapelayer layer]; Shape.path = path. Cgpath; ImgView.layer.mask = shape; [Self.view Addsubview:imgview];
Here's a way to add:
[M_photo.layer setcornerradius:cgrectgetheight ([m_photo bounds])/2];//Set circle radius m_photo.layer.masksToBounds = YES ; m_photo.layer.borderWidth = 1;//set outer ring width m_photo.layer.borderColor = [[Uicolor greencolor] cgcolor];//set outer ring color M_photo.layer.contents = (ID) [[UIImage imagenamed:@ "Index.png"] cgimage];//settings picture
iOS makes a circular effect on a picture