12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // VipLessonTableHeaderView.m
- // jiaPei
- //
- // Created by 张嵘 on 2019/6/26.
- // Copyright © 2019 JCZ. All rights reserved.
- //
- #import "VipLessonTableHeaderView.h"
- @interface VipLessonTableHeaderView ()
- @end
- @implementation VipLessonTableHeaderView
- - (void)awakeFromNib {
- [super awakeFromNib];
- [super drawRect:CGRectZero];
- }
- - (void)drawRect:(CGRect)rect {
- CGFloat R = kScreenWidth / 2.0;
- CGContextRef context = UIGraphicsGetCurrentContext();
-
- //背景颜色设置
- [[UIColor whiteColor] set];
- CGContextFillRect(context, rect);
-
- //填充颜色
- CGContextSetFillColorWithColor(context, RGB_COLOR(84, 207, 119).CGColor);
-
- CGContextAddArc(context, R, -(R * (7.0 / 6.0)), 2*R, (90 * M_PI / 180), (-360 * M_PI / 180), 1);//如果圆弧是顺时针画的,“clockwise”是1,否则是0;
- CGContextDrawPath(context, kCGPathFillStroke);
- }
- - (IBAction)signUpBtnAction:(id)sender {
- _notVipView.hidden = !_notVipView.hidden;
- }
- @end
|