Skip to content

Commit

Permalink
add centerCircleBackgroundColor property
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Jul 28, 2021
1 parent 2063205 commit 083614c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

/*! @brief Value that controls the thickness of pieces in the pie chart*/
@property CGFloat centerCircleRadius;
@property UIColor* centerCircleBackgroundColor;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ @implementation PieChartController
@synthesize backgroundView;
@synthesize database;
@synthesize centerCircleRadius;
@synthesize centerCircleBackgroundColor;

//Delegate
@synthesize radius;

- (instancetype)init
{
self = [super init];
if (self) {
centerCircleBackgroundColor = [UIColor blackColor];
}
return self;
}

- (void)layoutSubviews {
[super layoutSubviews];

Expand All @@ -44,7 +54,7 @@ - (void)layoutSubviews {
}

UIView *centerCircleView = [[UIView alloc] init];
centerCircleView.backgroundColor = [UIColor blackColor];
centerCircleView.backgroundColor = centerCircleBackgroundColor;
centerCircleView.layer.cornerRadius = centerCircleRadius/2;
centerCircleView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview: centerCircleView];
Expand Down

0 comments on commit 083614c

Please sign in to comment.