You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.0 KiB

//
// FBYLineGraphColorView.m
// FBYDataDisplay-iOS
//
// Created by fby on 2018/1/18.
// Copyright © 2018FBYDataDisplay-iOS. All rights reserved.
//
#import "FBYLineGraphColorView.h"
@implementation FBYLineGraphColorView
- (instancetype)initWithCenter:(CGPoint)center radius:(CGFloat)radius {
self = [super init];
if (self) {
self.frame = CGRectMake(center.x - radius, center.y - radius, radius * 2.0, radius * 2.0);
self.backgroundColor = [UIColor whiteColor];
self.layer.cornerRadius = radius;
self.layer.masksToBounds = YES;
}
return self;
}
- (void)setBorderWidth:(CGFloat)borderWidth {
_borderWidth = borderWidth;
self.layer.borderWidth = borderWidth;
}
- (void)setBorderColor:(UIColor *)borderColor {
_borderColor = borderColor;
self.layer.borderColor = borderColor.CGColor;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end