Skip to content

Commit

Permalink
Minor formatting changes for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
danielamitay committed Apr 14, 2015
1 parent 9332a3c commit 1d6a526
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions DACircularProgress/DACircularProgressView.m
Expand Up @@ -51,12 +51,9 @@ - (void)drawInContext:(CGContextRef)context

CGFloat progress = MIN(self.progress, 1.0f - FLT_EPSILON);
CGFloat radians = 0;
if (clockwise)
{
if (clockwise) {
radians = (float)((progress * 2.0f * M_PI) - M_PI_2);
}
else
{
} else {
radians = (float)(3 * M_PI_2 - (progress * 2.0f * M_PI));
}

Expand Down Expand Up @@ -171,6 +168,7 @@ - (void)didMoveToWindow
[self.circularProgressLayer setNeedsDisplay];
}


#pragma mark - Progress

- (CGFloat)progress
Expand Down Expand Up @@ -230,6 +228,7 @@ - (void)animationDidStop:(CAAnimation *)animation finished:(BOOL)flag
self.circularProgressLayer.progress = [pinnedProgressNumber floatValue];
}


#pragma mark - UIAppearance methods

- (UIColor *)trackTintColor
Expand Down
6 changes: 3 additions & 3 deletions DACircularProgress/DALabeledCircularProgressView.m
Expand Up @@ -28,6 +28,7 @@ - (id)initWithCoder:(NSCoder *)aDecoder
return self;
}


#pragma mark - Internal methods

/**
Expand All @@ -36,9 +37,8 @@ - (id)initWithCoder:(NSCoder *)aDecoder
*/
- (void)initializeLabel
{
self.progressLabel = [[UILabel alloc]
initWithFrame:self.bounds];
[self.progressLabel setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
self.progressLabel = [[UILabel alloc] initWithFrame:self.bounds];
self.progressLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
self.progressLabel.textAlignment = NSTextAlignmentCenter;
self.progressLabel.backgroundColor = [UIColor clearColor];
[self addSubview:self.progressLabel];
Expand Down
Expand Up @@ -42,8 +42,7 @@ - (void)viewDidLoad
self.largestProgressView.clockwiseProgress = NO;

// Labeled progress views
self.labeledProgressView = [[DALabeledCircularProgressView alloc]
initWithFrame:CGRectMake(200.0f, 20.0f, 60.0f, 60.0f)];
self.labeledProgressView = [[DALabeledCircularProgressView alloc] initWithFrame:CGRectMake(200.0f, 20.0f, 60.0f, 60.0f)];
self.labeledProgressView.roundedCorners = YES;
[self.view addSubview:self.labeledProgressView];

Expand Down

0 comments on commit 1d6a526

Please sign in to comment.