1. Picture head cut into circles "not the radius, not the circle."
self. Imgvhead . Clipstobounds =YES;
self . imgvhead Layer Cornerradius = self imgvhead Bounds Size Height/ 2 ;
self. Imgvhead . Layer. BorderWidth = 0.5f;
Self.Imgvhead.Layer.BorderColor = [Uicolor colorwithred:0Green:0Blue:0Alpha:0.3].Cgcolor;
2.UILabel Bottom Display a line
nsmutableattributedstring *str = [[nsmutableattributedstringalloc] initwithstring : Self . Lblcheckdetail . Text];
nsrange strrange = {0, [strlength]};
[str addattribute:nsunderlinestyleattributenamevalue: [NSNumber Numberwithinteger: Nsunderlinestylesingle]range: Strrange];
[self. Lblcheckdetail setattributedtext: str];
3. Customize the effect of a transparency gradient
uicolor *colorone = [uicolor colorwithred :(33 /255.0 ) green :(33 /255.0 ) blue :(33 /255.0 ) alpha : 0.0 ];
uicolor *colortwo = [uicolor colorwithred :(33 /255.0 ) green :(33 /255.0 ) blue :(33 /255.0 ) alpha : 1.0 ];
nsarray *colors = [nsarrayarraywithobjects:(ID) colorone. Cgcolor, Colortwo. Cgcolor, nil];
nsnumber *stopone = [nsnumbernumberwithfloat:0.0];
nsnumber *stoptwo = [nsnumbernumberwithfloat:1.0];
nsarray *locations = [nsarrayarraywithobjects: Stopone, Stoptwo, Nil];
cagradientlayer *headerlayer = [cagradientlayerlayer];
Headerlayer. colors = colors;
Headerlayer. Locations = locations;
cgfloat width = self viewgradualalpha Bounds Size Width + screen_width - self cellimgvtop Bounds Size Width
cgfloat height=self. Viewgradualalpha . Bounds. Size. Height;
Headerlayer. frame =cgrectmake(0,0, width, height);
[Self. Viewgradualalpha. Layer insertsublayer: Headerlayer atindex:0];
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Picture Tangent circle, label text with a line at the bottom, custom view transparency gradient effect