效果图
iOS中圆在顺时针方向的时候圆的0点位置
创建一个Label继承自UILabel,并重写- (void)drawRect:(CGRect)rect;
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
// 宽度
CGFloat w = rect.size.width;
// 高度
CGFloat h = rect.size.height;
UIBezierPath *path = [UIBezierPath bezierPath];
// 起点(0,0)
[path moveToPoint:CGPointMake(0, 0)];
// 从(0, 0)画一条线到(w - h, 0)
[path addLineToPoint:CGPointMake(w - h, 0)];
// 以(w - h, h)为圆中心,h为半径, 顺时针方向画一段1/4圆弧, clockwise:顺时