draw a dashed line
cashapelayer *shapelayer = [cashapelayer layer];
[Shapelayer setbounds:self. Backview. Bounds];
[Shapelayer setposition:self. Backview. Center];
[Shapelayer setfillcolor: [[uicolor clearcolor] cgcolor];
// set dashed color to blackcolor
[Shapelayer setstrokecolor: [[uicolor blackcolor] cgcolor];
[Shapelayer setstrokecolor: [[uicolor colorwithred:223/255.0 Green :223/255.0 Blue:223/255.0 Alpha:1.0f] Cgcolor]];
//3.0f Set the width of the dashed line
[Shapelayer setlinewidth:0.5f];
[Shapelayer setlinejoin:kcalinejoinround];
//3= line width 1= The spacing of each line
[Shapelayer setlinedashpattern:
[nsarray arraywithobjects: [nsnumber numberwithint:4],
[nsnumber numberwithint:2],Nil]];
// set path
cgmutablepathref Path = cgpathcreatemutable();
cgpathmovetopoint (path, nullself. Coupnumberlabel. Frame. Origin. X + self. Coupnumberlabel. Frame. Size. Width10 x dashed x axis start y dashed y axis start
Cgpathaddlinetopointnull,self. Coupnumberlabel. Frame. Origin. X + self. Coupnumberlabel. Frame. Size. Width,164/2- 10); //x dashed X axis start y dashed height
[Shapelayer SetPath:p ath];
cgpathrelease(path);
[Self layer] addsublayer: Shapelayer];
Draw a dashed line